What about if you localize the creation of a window? For example, I sometimes will use a sub that creates a window only when called and when the sub returns the window and any reference to it is undef?

-----Original Message-----
From: Jeremy White [mailto:jez_white@hotmail.com]
Sent: Friday, November 21, 2003 3:55 AM
To: Peter.Eisengrein@atx.com; darin@essex.ac.uk;
perl-win32-gui-users@lists.sourceforge.net
Subject: RE: [perl-win32-gui-users] Destroying a window


Unfortunately undef does not release the resources that window uses. So, if
you need to dynamically create (and destroy) a window continually then at
some point you will run out of memory.


>From: Peter Eisengrein <Peter.Eisengrein@atx.com>
>To: "'Cruickshanks, Darin'" <darin@essex.ac.uk>,
>perl-win32-gui-users@lists.sourceforge.net
>Subject: RE: [perl-win32-gui-users] Destroying a window
>Date: Thu, 20 Nov 2003 12:14:22 -0500
>
>One quick and dirty way to do it would be undef($Window); but that may
>cause
>other problems if you have other widgets that reference the window. For
>example, if you have a Timer that updates a clock on $Window every second,
>you will begin to get errors every second. So, unless you *really* want to
>eliminate it, you might be better to just Hide it.
>
>-----Original Message-----
>From: Cruickshanks, Darin [mailto:darin@essex.ac.uk]
>Sent: Thursday, November 20, 2003 5:21 AM
>To: perl-win32-gui-users@lists.sourceforge.net
>Subject: [perl-win32-gui-users] Destroying a window
>
>
>
>All,
>
>How do you destroy a window in Win32::Gui?  I read about a Destroy() method
>but this doesn't seem to help.  In the past I have just hidden any windows
>that I wanted to remove but I now nee to destroy one completely.
>
>
>
>Darin
>--------------------------------------------
>Darin Cruickshanks
>Labs Manager, Computing Service
>University of Essex
>  <mailto:darin@essex.ac.uk> darin@essex.ac.uk
>01206 873585
>

_________________________________________________________________
Sign-up for a FREE BT Broadband connection today!
http://www.msn.co.uk/specials/btbroadband