Remove Py_INCREF and Py_DECREF for objects in doubly linked list.
The cache is intended to keep weak references to objects. An object should be deallocated when the only references to it are in the cache. If an object is unghostified and added to the list of live objects, the list should have a borrowed reference. Otherwise, the cache will keep the object alive after all other references have disappeared.
Showing
Please register or sign in to comment