On Mon, Mar 13, 2017 at 08:52:09AM -0700, Nick Wellnhofer via RT wrote: > 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). Can you provide a short, self-contained perl program which demonstrates the bug, and which would be fixed by why you propose above; just so that we can be sure we're all discussing the same issue. -- In economics, the exam questions are the same every year. They just change the answers.Thread Previous | Thread Next