At 08:12 2001-12-24 -0600, Mark Wilkinson wrote:
Is this considered...ummm... "normal" behavior??

What is it about the architecture of the Win32GUI modules that makes it work
this way?  It is really the most peculiar thing I have ever seen, and breaks
every model for OO programming that I know of... (i.e. that the contents of an
object must be maintained as references outside of the object for them to remain
in scope)

Some Win32::GUI Perl objects contain handles to Win32 (os level) structures, which are deallocated once the Perl object is destroyed. That might be considered a good thing.

What might be considered a bad thing is that some Win32::GUI controls doesn't take the responsibility to keep the reference count for the object up so it doesn't get garbage collected and destroyed while in use (if you declared it as a lexical variable). So you'll have to do that explicitly by e.g. assigning it to the property of another, more persistent object, or to a package var that never goes out of scope.


/J

-------- ------ ---- --- -- --  --  -    -     -      -         -
Johan Lindström    Sourcerer @ Boss Casinos     [EMAIL PROTECTED]

Latest bookmark: "Troubleshooting Guide"
<http://manuals.sybase.com/onlinebooks/group-rs/rsg1100e/rs_tsg/@Generic__BookView/4140;cs=default;ts=default>



Reply via email to