Reference counter of builtin descriptor objects
![](https://secure.gravatar.com/avatar/31d770c3ff5023b31bbdb0bef5432759.jpg?s=120&d=mm&r=g)
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
participants (1)
-
Matthias Höffken