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

Home » Public Forums » archive » Re: In catalyst, how do I decide which object need to be destroyed by hand?
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: In catalyst, how do I decide which object need to be destroyed by hand? [message #67167 is a reply to message #67162] Wed, 01 July 2009 08:49 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Dave writes:

> In catalyst, how do I decide which object need to be destroyed by
> hand? Because I find some objects, such as ButtonWidget, can destroy
> itself. But others, such as SelectableDrawWidget and IMGAXES, need to
> destroyed in cleanup procedure. Thanks very much!

You must be writing your Catalyst programs differently
than I am. :-)

I don't find that *any* of the Catalyst objects need
to be destroyed by hand, if they are properly added to
the widget container hierarchy as they are created.
(The top of any Catalyst program I build is a TopLevelBase
object.)

If you are creating an object that is going to have
a "has a" relationship to a Catalyst object, the object
must register interest in the Catalyst object by making
itself the parent of the Catalyst object. Then, in your
cleanup method, you simply remove yourself as the parent
of the Catalyst object. If this is the only parent, the
Catalyst object should be destroyed automatically.

Perhaps you can give me some indication of how you are using
these objects that aren't cleaning themselves up.

Cheers,

David

--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Interactive Debugging Tools
Next Topic: Re: Interactive Debugging Tools

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

Current Time: Fri Oct 10 21:00:44 PDT 2025

Total time taken to generate the page: 1.11818 seconds