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 #26975 is a reply to message #26974] Tue, 09 October 2001 13:15 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mark Hadfield (m.hadfield@niwa.cri.nz) writes:

> 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
>

I've thought all day long that this guy was really
trying to use an INHERITS in his structure definition,
not another structure definition. I'm sure this is what
Karl was thinking, too, in his reply.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[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: Sat Nov 29 20:41:00 PST 2025

Total time taken to generate the page: 0.00328 seconds