[Numpy-discussion] Reference counter of builtin descriptor objects

Matthias Höffken hoeffken@ipk-gatersleben...
Fri Aug 24 03:46:05 CDT 2007


Greetings,

I struggling with the numpy C-API (version 1.0.3).
Now I have obscurities concerning the reference counter of builtin
descriptor objects. In some situation, when running my own code, the
reference counter fall to zero an I get warning messages. In some other
samples the reference counter increases more and more while the program
is running  and the average number of used object is keeping constant.

Now I would like to know when I have to take care about the reference
counter of builtin descriptor objects. Especially when using
"PyArray_SimpleNew", "PyArray_SimpleNewFromData", "PyArray_NewFromDescr"
and "PyArray_SimpleNewFromDescr".
Up to now I never touched the counters in my code after using this
functions resulting in the described problems.

Another case concerns parsing the arguments of functions. I often use
such kind of expressions:

PyArg_ParseTupleAndKeywords(args, kwds, "O!O!", kwlist, &PyArray_Type,
&array1, &PyArray_Type, &array1))

Normally I would expect, that no reference counter is changed. Is that
really true?

Many thanks in advance!

Matthias





-------------- next part --------------
A non-text attachment was scrubbed...
Name: hoeffken.vcf
Type: text/x-vcard
Size: 314 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070824/5b4eedd3/attachment.vcf 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070824/5b4eedd3/attachment.bin 


More information about the Numpy-discussion mailing list