Perl-Sensitive Sunglasses | |
PerlMonks |
Re: orderly global destruction? blessed references gone? XS ok (sub Main)by tye (Sage) |
on Jul 27, 2011 at 03:27 UTC ( [id://916914]=note: print w/replies, xml ) | Need Help?? |
This is one of the reasons I (still) use my long-standing (and slowly evolving) practice for laying out Perl scripts, outlined in (tye)Re: Stupid question. In my one module where I have the potential for inner objects, I was able to use the "just check for inner object destroyed early" trick that you mentioned. That is what I would do if possible. If you are just free()ing allocated memory, then that should be enough. In general, I find it is an excellent idea to avoid XS as much as possible. Doing complex tricks in XS like you discuss above seems to me a pretty bad idea. I see tons of problems (including "core dumps") that appear to be from bugs in even fairly simple XS code in quite main-stream modules that are well maintained. - tye
In Section
Seekers of Perl Wisdom
|
|