Re: Greg Haberek's Window Monitor - Interesting Results
- Posted by Greg Haberek <g.haberek at comcast.net> Apr 07, 2003
- 405 views
Keep in mind my Windows Monitor is a Win32Lib-based app, so any windows that Win32Lib creates on its own will still show up. Here is some info on destroy(): -- begin snip from win32lib.htm -- [proc] destroy ( id ) Destroy an object created with the create function. Category: Attributes >> When a control is destroyed, it releases its resources back to Windows. This >> also means that a parent control also destroys its child controls. << When the control being destroyed is a Window, it cannot be reopened. If you want to be able to reopen a window, use closeWindow() instead of destroy(). When this is called, but before the control is actually destroyed, the w32HDestroy event is triggered, enabling you to clean up things associated with this control. Or even prevent the control from being destroyed, by returning -1 from the event handler. The following will destroy a pushbutton called MyButton. -- destroy a pushbutton destroy( MyButton ) -- end snip -- Since a Window destroys its children (sounds lovely, doesn't it?) shouldn't that free up all resources when the program exits? (unless there is a leak in Win32Lib). And when I call closeWindow() to close my program, does it destroy() my window also? or should I call destroy() to closee the program? ----- Original Message ----- From: Jonas Temple <jtemple at yhti.net> To: EUforum <EUforum at topica.com> Sent: Monday, April 07, 2003 11:55 AM Subject: RE: Greg Haberek's Window Monitor - Interesting Results Wow, so all this time I've not been closing my programs down incorrectly. As a suggestion, would it be possible to automatically call destroy() when the main window is referenced in a call to closeWindow()? Does this explain why there were so many entries for "tooltip_class32"? Jonas Derek Parnell wrote: > Jonas, > the closeWindow() routine only hides the window, unless its the main > window, > in which case the app closes down. To totally remove windows, use > destroy() > instead. > > closeWindow() is good for windows that are constantly opening and > closing > again. Its faster than doing a create/destroy sequence. > ---------------- > cheers, > Derek Parnell TOPICA - Start your own email discussion group. FREE!