develooper Front page | perl.perl5.porters | Postings from September 2011

[perl #98204] Shared objects not destoryed

Thread Previous | Thread Next
Father Chrysostomos via RT
September 8, 2011 08:34
[perl #98204] Shared objects not destoryed
Message ID:
On Thu Sep 08 00:41:19 2011, sprout wrote:
> On Thu Sep 08 00:00:09 2011, sprout wrote:
> > On Wed Sep 07 08:24:40 2011, sprout wrote:
> > > If we create a proxy for everything that is freed, even if it is not
> > > blessed, then ref refs and nested aggregates will work.  I think I’m
> > > going to do it this way.
> > 
> > Attached are two patches.  The first one is a minor refactoring to
> > S_get_RV in preparation for the second patch.  The second one fixes the
> > bug by creating a proxy for sub-items of anything about to be freed, if
> > those sub-items are otherwise unreferenced shared SVs.
> > 
> > I still need to write a commit message for the second patch.
> > 
> > As I’ve never modified shared.xs before, I would appreciate review and
> > approval from someone else before I commit this.
> That patch is no good. It makes clone.t loop.

Here is a better one.  It simple skips the magic dance during global

That means that unproxied shared objects that are around at global
destruction time will not have their destructors fired, but it’s still
better than what we had before.

I cannot see how to make this work during global destruction.  It’s
circular refs that are the problem.  I don’t know how to detect those
without leaking memory in the PL_sharedsv_space.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About