Re: [AD] more about memory leaks

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]



On Thu, 4 Oct 2001, Eric Botcazou wrote:

> > General contract for exit functions is to remove itself from the
> > exit_func_list. See, for example, debug_exit().
>
> What a funny convention ! What's the rationale ?

Ask Shawn :-)

> It seems I'm not the only one to get caught by it: there is precisely a
> memory leak caused by a slot allocated by _add_exit_func() and never freed !
> (in the test program)

In real OSes, all the unshared memory is freed on exit, so the only reason
to free simple arrays/lists/other dynamic structures there is for
completness, but not needed. But it's good behaviour, of course :-)

Have a nice day.

Stepan Roh



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/