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

Home » Public Forums » archive » Question about the object lifecycle
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
Question about the object lifecycle [message #68658] Sat, 07 November 2009 14:22
M. Katz is currently offline  M. Katz
Messages: 69
Registered: May 2005
Member
Within complex graphic objects, I often add objects to a main model
like this

self.oModel = obj_new('IDLgrModel')
self.oModel -> Add, obj_new('IDLgrPolygon', . . .)

I don't keep an explicit reference to the IDLgrPolygon object in this
case because I don't need it.

My question is: What happens to the IDLgrPolygon once I destroy the
parent object? My Cleanup method explicity destroys the self.oModel.
So what becomes of the orphaned IDLgrPolygon? Will it go into heap
limbo and ultimately be recycled? Or will it take up space until the
IDL session is reset? I can see from a quick test using HELP that once
the IDLgrModel is destroyed, the reference to the child object becomes
<ObjHeapVar2>, like that.

As a best-practice, should I be keeping the references to every object
I create in this way, so I can explicitly destroy them in the Cleanup
method?

Thanks,
M.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL 7.0 under ubuntu 9.10
Next Topic: Re: Question about the object lifecycle

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

Current Time: Fri Oct 10 09:25:54 PDT 2025

Total time taken to generate the page: 0.56012 seconds