develooper Front page | perl.perl5.porters | Postings from May 2013

Re: [perl #118139] Storable in DESTROY blocks

Thread Previous | Thread Next
From:
Reini Urban
Date:
May 23, 2013 19:41
Subject:
Re: [perl #118139] Storable in DESTROY blocks
Message ID:
519E70DE.3070608@cpanel.net
On 05/23/2013 10:58 AM, Leon Timmermans via RT wrote:
> On Thu, May 23, 2013 at 5:45 PM, Steffen Mueller <smueller@cpan.org> wrote:
>> There's a more general problem with this: occasionally, C extensions need to
>> do cleanup very late during global destruction. Usually just a free() or
>> Safefree() to be done after all Perl code is done. Maybe adding a C level
>> hook for this could allow Storable to work around this problem as well?
>> Given what you write, I think maybe not that easily.
>
> That would not solve this problem. This problem is not in a DESTROY
> from Storable, but from other code calling Storable from they DESTROY
> methods.

DESTROY in Storable in part of the problem.
We have to die in Storable if called during destruction, because 
Storable has its own DESTROY block which frees ctx, and you are not 
allowed to access that then.
-- 
Reini

Working towards a true Modern Perl.
Slim, functional, unbloated, compile-time optimizable

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About