On 3/6/16 3:27 PM, John Darrington wrote: > These are not leaks; this is simply allocated memory to which the > application still has a handle when the program exits. > > This may well be true. But having these hanging around can mask other blocks > of allocated memory which really are leaks.
That's why valgrind reports them separately.
> > I suggest that readline establish an "atexit" function during
> initialization
> > that will cleanup... or (less desirable) provide a suitable function
> > for the
> > application to call "atexit".
>
>
> In fact, a library which calls atexit is highly undesireable. The reason is,
> that if
> your program also calls atexit (or another library you're linking against
> does) then
> you have no control over which "atexit" payload gets called first.
That's now really how it would work in practice. If I implemented
something like this, it would be called something like rl_atexit and
it would be up to the application to register it.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Bug-readline mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-readline
