Re: [win32gui] [perl-win32-gui-hackers] Commit

2005-08-10 Thread Robert May
Jeremy White wrote: Have you tried this? It's sort of equivalent to } my $mw; $mw = Win32::GUI::Window->new( ... -onTerminate => sub { undef $mw }, ); } Which uses a closure to stop $mw's ref count going to zero at the end of the enclosing block, but forces it to zero in the onT

Re: [win32gui] [perl-win32-gui-hackers] Commit

2005-08-10 Thread Jeremy White
Have you tried this? It's sort of equivalent to } my $mw; $mw = Win32::GUI::Window->new( ... -onTerminate => sub { undef $mw }, ); } Which uses a closure to stop $mw's ref count going to zero at the end of the enclosing block, but forces it to zero in the onTerminate hand