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

Home » Public Forums » archive » Re: Recursive Objects
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: Recursive Objects [message #27085 is a reply to message #26976] Wed, 10 October 2001 07:52 Go to previous messageGo to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
"Mark Hadfield" <m.hadfield@niwa.cri.nz> wrote in message
news:001501c150fd$d00b6440$d938a8c0@Hadfield...
> From: "Karl Schultz" <kschultz@researchsystems.com>
>>> pro my_obj__define
>>> struct = {my_obj, another_obj:OBJ_NEW()}
>>> end
>> ....
>> Also note that you do not need to explicitly destroy this instance of
>> "SomeOtherClass" in the my_obj::Cleanup method. Since the objref is in
> the
>> class struct, IDL will find and destroy it for you.
>
> Not in my experience!
>
> When IDL destroys a my_obj instance it will erase an object reference
stored
> in the my_obj class structure. It will *not* destroy the heap variable
that
> this reference refers to. So to avoid a memory leak you need
>
> pro my_obj::cleanup
> obj_destroy, self.another_obj
> ; Other cleanup tasks
> end

Oops, you are right. The object I was thinking about was a container object
(inherits from a container object) where the Init method added an object to
the container right after creating it. So, when the container gets
destroyed, the added object gets destroyed too. Sorry about that.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Error propagation expressions
Next Topic: CURSOR question

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

Current Time: Sun Nov 30 03:39:13 PST 2025

Total time taken to generate the page: 0.56308 seconds