quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Gallacher <...@jgassociates.ca>
Subject Re: memory leak in request.readline()
Date Fri, 11 Aug 2006 21:51:40 GMT
Alexis Marrero wrote:
> I forgot to mentioned that I changed request_tp_dealloc to:
> static void request_tp_dealloc(requestobject *self)
> {    // de-register the object from the GC
>    // before its deallocation, to prevent the
>    // GC to run on a partially de-allocated object
>    if (self->rbuff != NULL) {
>        free(self->rbuff);
>    }
>    PyObject_GC_UnTrack(self);
>      request_tp_clear(self);
> 
>    PyObject_GC_Del(self);
> }
> 
> I don't know if that function will be the right place to
> free(self->rbuff) but it for the mean time there is no leak in my test.

Somehow that doesn't feel like the right spot, but I'm not sure either.

Jim





Mime
View raw message