On Mon, 13 Mar 2017 02:31:15 -0700, davem wrote: > But has just been pointed out, freeing package vars before calling > destructors breaks everything. I realize that this problem is harder than I initially thought. But I think it could be solved by deferring freeing of package vars during global destruction. So if a refcount drops to zero, DESTROY is invoked, the object is not freed, but refcounts of other objects that are referred to are decreased. In other words, you simulate freeing an object just for refcount side effects. Then, in a second pass, DESTROY is invoked on objects that still have a refcount (because of circular references or refcount leaks). --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=32714Thread Previous | Thread Next