[Numpy-discussion] views and object lifetime
Wed Feb 18 08:54:10 CST 2009
> 2009/2/18 Neal Becker <email@example.com>:
> Matthieu Brucher <matthieu.brucher <at> gmail.com> writes:
>> B has a reference to A.
> Could you be more specific? Where is this reference stored? What C api
> functions are used?
I'm probably not qualified to be much more specific, these links
should provide the necessary detail:
The Python interpreter takes care of when to free the memory
associated with an object once it's reference count reaches zero. The
object reference counts are increased and decreased directly in C code
using the Py_INCREF and Py_DECREF macros whenever a new object is
created or a new pointer assigned to an existing object.
More information about the Numpy-discussion