On Apr 11, 2007, at 09:42 UTC, Dr Gerard Hammond wrote: > Each child needs to clean up it's link to the parent. Just call your > own child.cleanup when closing the parent (ie in the _parent's_ > destructor)
No, not in the destructor -- the whole point here is that the parent's destructor will never get called (because the object will never be destroyed) as long as the circular reference exists. You need to explicitly call .cleanup on the parent before releasing your reference to it. This is not unlike windows, which have a Close method that, among other things, releases all the window's references to its controls (after calling Close on them as well). You can do the same thing in your own classes. Best, - Joe -- Joe Strout -- [EMAIL PROTECTED] Verified Express, LLC "Making the Internet a Better Place" http://www.verex.com/ _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
