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 #26976 is a reply to message #26975] Tue, 09 October 2001 13:06 Go to previous messageGo to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
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

---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research



--
Posted from clam.niwa.cri.nz [202.36.29.1]
via Mailgate.ORG Server - http://www.Mailgate.ORG
[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:17 PST 2025

Total time taken to generate the page: 0.24230 seconds