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

Home » Public Forums » archive » Call object cleanup method when IDL exits
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: Call object cleanup method when IDL exits [message #85623 is a reply to message #85620] Thu, 22 August 2013 07:31 Go to previous messageGo to previous message
Moritz Fischer is currently offline  Moritz Fischer
Messages: 32
Registered: June 2013
Member
Hi David,

sorry, I didn't mean to pm you.
However, I just figured out you can do this:

PRO my_exit
help, LEVEL=-1, OUTPUT=o
funny_array = strsplit( strjoin( o, ' '),' ', /EXTRACT)
foreach var, funny_array do $
tmp = temporary( scope_varfetch(var, LEVEL=-1, /ENTER) )
tmp=42
exit
END

Neverthe less: Let me know if you find something more elegant!

cheers

Am 22.08.2013 15:04, schrieb David Grier:
> Dear Folks,
>
> I want to ensure that my object's cleanup method is called when IDL exits.
> What's the right way to do this?
>
> The issue is that my object spawns a background process that it subsequently
> kills when the object is cleaned up. It appears that IDL does not automatically
> call objects' cleanup methods when it shuts down normally.
> Consequently, the background process can be left running.
>
> This isn't a problem for well-written programs that explicitly call obj_destroy.
> It arises all the time during interactive sessions, however.
>
> Is there a switch that tells IDL to be extra fastidious about cleaning up objects?
> Perhaps an equivalent to IDL_STARTUP that works on shutdown? Or is there some
> other technique to ensure that every object on the heap is cleaned up before
> IDL shuts down?
>
> Many thanks,
>
> David
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Navigating AVIRIS Images
Next Topic: avoiding "floating illegal operand" errors with /nan keyword in mean

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

Current Time: Thu Oct 09 07:47:16 PDT 2025

Total time taken to generate the page: 0.48061 seconds