I was envisioning a simpler patch.  I'll write it up soon for you
to look at.  (Sorry, my family has been visiting the last week
and they've kept me away from my computer.)

John Darrington <[email protected]> writes:

> OK.  How about this new patch, which keeps the switch entirely within
> case.c
>
> J'
>
>
> On Mon, Oct 04, 2010 at 12:42:03PM -0700, Ben Pfaff wrote:
>      John Darrington <[email protected]> writes:
>      
>      > It's almost impossible to track down memory leaks when ref counted
>      > objects are involved.  I'm proposing this patch to case.[ch] which
>      > allows a preprocessor option to be set redefining case_ref and 
> case_unref 
>      > to unconditionally copy and destroy cases respectively.  
>      >
>      > It would be easier to use if we could put the switch entirely inside 
> case.c,
>      > since almost everything depends upon case.h -- but we could only do 
> that
>      > if we sacrificed the benefits of the inline functions.
>      
>      I think that this is valuable enough that we should move it into
>      case.c.  I'm half-inclined to think that we should make it
>      configurable at runtime instead of at compilation time, but once
>      it is isolated in case.c this is less important because only a
>      single file will have to be recompiled if the setting changes.
>      -- 
>      Ben Pfaff 
>      http://benpfaff.org

-- 
Ben Pfaff 
http://benpfaff.org

_______________________________________________
pspp-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to