Jeremy White schrieb:
Except for when you exit, and a crash occurs (perl 5.6 GUI 1.02 Attempt
to free unreferenced scalar at C:/Perl/site/lib/Win32/GUI.pm line 3266).
I do create a circular link, with a closure being used to 'remember the
object (In my own application, the closure is of the window, not an
object that contains it, and this doesn't crash). I'm not sure if this
is a bug within win32-gui or my code?
This is a known bug with win32-gui.
It is fixed by using perl 5.7 or later or using the circular ref patch
I posted to the list during the 1.02 release cycle. A similar section
was applied some years ago, but removed because older perl don't allow
circular refs at all.
Remember to DESTROY any dangling circular refs with perl <= 5.6.
Or is there a better way to create a perl object that can handle both
method calls and events?
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/
http://phpwiki.org/