Re: Memory leaks

Jeremy Hylton <[email protected]> Tue, 25 Oct 2005 13:12:18 -0400
Newsgroups gmane.comp.python.compiler
Message-ID <[email protected]>
Would it make sense to have the constructors own their arguments even
when they fail?  That is, have them free the arguments if they can't
constructor an object?  Or have a variant of the constructor functions
that does behave this way?

Jeremy

On 10/25/05, Neal Norwitz <[email protected]> wrote:
> On 10/25/05, Neil Schemenauer <[email protected]> wrote:
> >
> > Should be fixed.
>
> Thanks.
>
> > While poking around I noticed a large number of theoretical
> > leaks.  Code like:
> >
> >     return Delete(expr_list, LINENO(n));
> >
> > when it should be:
> >
> >     r = Delete(expr_list, LINENO(n));
> >     if (!r)
> >         asdl_free_free(expr_list);
> >     return r;
> >
> > How tedious.
>
> Yup, I think I got a bunch of outstanding changes for some of those,
> but there are many, many more.
>
> n
>