[Numpy-discussion] Another reference count leak: ticket #848

2008-07-08 Thread Michael Abbott
The attached patch fixes another reference count leak in the use of PyArray_DescrFromType. Could I ask that both this patch and my earlier one (ticket #843) be applied to subversion. Thank you. Definitely not enjoying this low level code. commit 80e1aca1725dd4cd8e091126cf515c39ac3a33ff Autho

Re: [Numpy-discussion] Another reference count leak: ticket #848

2008-07-08 Thread Charles R Harris
On Tue, Jul 8, 2008 at 3:35 AM, Michael Abbott <[EMAIL PROTECTED]> wrote: > The attached patch fixes another reference count leak in the use of > PyArray_DescrFromType. > > Could I ask that both this patch and my earlier one (ticket #843) be > applied to subversion. Thank you. > I'll take a look

Re: [Numpy-discussion] Another reference count leak: ticket #848

2008-07-08 Thread Travis E. Oliphant
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. Also, it would be useful if you could write a test case that shows what is leaking and how you determined t

Re: [Numpy-discussion] Another reference count leak: ticket #848

2008-07-08 Thread Charles R Harris
Hi Travis, On Tue, Jul 8, 2008 at 11:26 AM, Travis E. Oliphant <[EMAIL PROTECTED]> 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. Also, > it

Re: [Numpy-discussion] Another reference count leak: ticket #848

2008-07-08 Thread Michael Abbott
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 addr

Re: [Numpy-discussion] Another reference count leak: ticket #848

2008-07-08 Thread Robert Kern
On Tue, Jul 8, 2008 at 16:23, Michael Abbott <[EMAIL PROTECTED]> 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 se

Re: [Numpy-discussion] Another reference count leak: ticket #848

2008-07-08 Thread Charles R Harris
On Tue, Jul 8, 2008 at 3:23 PM, Michael Abbott <[EMAIL PROTECTED]> 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.

Re: [Numpy-discussion] Another reference count leak: ticket #848

2008-07-08 Thread Travis E. Oliphant
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. >>

Re: [Numpy-discussion] Another reference count leak: ticket #848

2008-07-09 Thread Michael Abbott
There are three separate patches in this message plus some remarks on "stealing" reference counts at the bottom. On Tue, 8 Jul 2008, Travis E. Oliphant wrote: > Michael Abbott wrote: > > On Tue, 8 Jul 2008, Travis E. Oliphant wrote: > >> The first part of this patch is good. The second is not

Re: [Numpy-discussion] Another reference count leak: ticket #848

2008-07-09 Thread Michael Abbott
On Wed, 9 Jul 2008, Michael Abbott wrote: > Well then, I need to redo my patch. Here's the new patch for > ..._arrtype_new: I'm sorry about this, I posted too early. Here is the final patch (and I'll update the ticket accordingly). commit a1ff570cbd3ca6c28f87c55cebf2675b395c6fa0 Author: Mic

Re: [Numpy-discussion] Another reference count leak: ticket #848

2008-07-09 Thread David Cournapeau
> I really don't think that this design of reference count handling in > PyArray_FromAny (and consequently PyArray_CheckFromAny) is a good idea. > Unfortunately these seem to be part of the published API, so presumably > it's too late to change this? (Otherwise I might see how the > corresponding

Re: [Numpy-discussion] Another reference count leak: ticket #848

2008-07-09 Thread Charles R Harris
On Wed, Jul 9, 2008 at 2:36 AM, Michael Abbott <[EMAIL PROTECTED]> wrote: > There are three separate patches in this message plus some remarks on > "stealing" reference counts at the bottom. > > > I really don't think that this design of reference count handling in > PyArray_FromAny (and consequ

Re: [Numpy-discussion] Another reference count leak: ticket #848

2008-07-18 Thread Travis E. Oliphant
> Looking at the uses of PyArray_FromAny I can see the motivation for this > design: core/include/numpy/ndarrayobject.h has a lot of calls which take a > value returned by PyArray_DescrFromType as argument. This has prompted me > to take a trawl through the code to see what else is going on, a