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

Home » Public Forums » archive » Yet another object graphics question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Yet another object graphics question [message #42791] Wed, 23 February 2005 23:54
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
Say that you want to write a utility function which will create a basic
plot. Let's say this function returned an IDLgrModel with some
IDLgrPlots on the the inside and various axes and the like. Because all
of the objects are in a single tree, destroying them is a snap -- just
destroy the top level object and the destruction cascades down.

Now what do you do if you want to create an IDLgrFont or other "helper"
object inside the utility function? You can't destroy the helper
because you'll get an invalid object reference where it had been used
and once you fall out of the function, you won't have a named variable
reference to the helper object. The helper will still be present on the
heap, but there isn't any name to pass obj_destroy. Once I finish using
the IDLgrModel returned from the function, I can destroy it, but the
helpers are left dangling.

Is there any rule of thumb ya'll follow for cases like this? I don't
want to have heap_gc commands in my code just to clean up after myself. :-)

-Mike
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL in Medical Imaging
Next Topic: Moving back a level...

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

Current Time: Fri Oct 10 11:44:45 PDT 2025

Total time taken to generate the page: 0.64083 seconds