comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: File Delete -- Friggin A!!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: File Delete -- Friggin A!! [message #69593 is a reply to message #69585] Fri, 05 February 2010 10:25 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Something really weird is happening. I can create files
> in IDL, and then delete them. The files I am having
> problems with are opened in objects. In general, these
> files are closed and then deleted (if required) in their
> CLEANUP methods. It is as if, when I get into the CLEANUP
> method, I can no longer access the LUN attached to the
> file, so these files cannot be closed properly. Once
> this happens, nothing I can do at the IDL command line
> can get the files out of this condition, and I have to
> exit IDL to gain access to permission to delete the files.

OK, all is right with the world again! :-)

My problems were occurring during program development
efforts while I was testing code and searching for bugs.
This might explain why tempers were a little frayed this
morning. In any case, I learned something that has bugged
me for a while in object programming.

I often find myself in "weird states" when I am debugging
object programs, and particularly widget object programs.
Typically when I am debugging, I am setting a lot of
breakpoints. As a result, my object programs don't always
run to completion. This can cause problems, of course,
if you don't destroy the object before you run the next
iteration of the program. (And who does!)

My problem, quite simply, is that my objects were not
running to completion and they were not getting destroyed.
Thus, they were keeping their files open and not allowing
me to delete them. Being objects, I suppose their innards
are hidden even from IDL. Or maybe it was because these were
netCDF files and those file LUNS are not normally accessible
to IDL's file tools. I don't know. In any case, a judicious
use of HEAP_GC in addition to CLOSE, /ALL makes it possible
for me to delete the offending files.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Serial port DLM for UNIX ?
Next Topic: Re: "shrink" structures

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 07:25:25 PDT 2025

Total time taken to generate the page: 0.24077 seconds