Michael Abbott wrote: > On Tue, 8 Jul 2008, Travis E. Oliphant wrote: > >> Michael Abbott wrote: >> >>> The attached patch fixes another reference count leak in the use of >>> PyArray_DescrFromType. >>> >>> >> The first part of this patch is good. The second is not needed. >> > I don't see that. The second part of the patch addresses the case of an > early return: this means that the DECREF that occurs later on in the code > is bypassed, and so a reference leak will still occur if this early return > case occurs. Don't forget that PyArray_DescrFromType returns an > incremented reference that has to be decremented, returned or explicitly > assigned -- the DECREF obligation has to be met somewhere. >
Don't forget that PyArray_FromAny consumes the reference even if it returns with an error. -Travis _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion