test_call_policies.cpp
3.26 KB
-
Hold strong references to keep_alive patients · 9d698f7f
This fixes #856. Instead of the weakref trick, the internals structure holds an unordered_map from PyObject* to a vector of references. To avoid the cost of the unordered_map lookup for objects that don't have any keep_alive patients, a flag is added to each instance to indicate whether there is anything to do.
Bruce Merry committed