• Bruce Merry's avatar
    Hold strong references to keep_alive patients · 9d698f7f
    Bruce Merry authored
    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.
    9d698f7f
pybind11.h 79.3 KB