pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Refcount struct dictionary ?


From: Ben Pfaff
Subject: Re: Refcount struct dictionary ?
Date: Mon, 1 Oct 2018 10:51:59 -0700
User-agent: Mutt/1.5.23 (2014-03-12)

On Sat, Sep 29, 2018 at 10:37:50AM +0200, John Darrington wrote:
> On Sun, Sep 23, 2018 at 11:00:17PM -0700, Ben Pfaff wrote:
> 
>      It seems like refcounting the dictionary will require a lot of care to
>      find all the places where a dictionary gets modified to un-share.  I
>      seem to recall that the variables in a dictionary have a reference
>      upward to the dictionary, too.
>      
>      I'm not saying that refcounting the dictionary is the wrong choice but
>      it needs to be done carefully.
> 
> 
> This version seems to fix all the memory error problems, and so far as
> I'm aware doesn't introduce any new issues.

Please add an assertion that ref_cnt > 0 in dict_unref().

This seems OK now.  I didn't test it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]