Le Fri, 08 Jan 2010 08:39:17 -0800, casevh a écrit :
> 
> Thanks for the reply. I realized that I missed one detail. The objects
> are created by the extension but are deleted by Python. I don't know
> that an object is no longer needed until its tp_dealloc is called. At
> that point, its reference count is 0.

tuple objects and others already have such a caching scheme, so you could 
download the Python source and look at e.g. Objects/tupleobject.c to see 
how it's done.

Regards

Antoine.


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to