[Top][All Lists]

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

Re: Debugging case refs

From: Ben Pfaff
Subject: Re: Debugging case refs
Date: Mon, 04 Oct 2010 12:42:03 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

John Darrington <address@hidden> 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

reply via email to

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