42 ObjectMap_t::iterator ppo = fObjectMap.find(cppobj);
43 if (ppo == fObjectMap.end()) {
44 fObjectMap.insert({cppobj, klass});
62 ObjectMap_t::iterator ppo = fObjectMap.find(cppobj);
63 if (ppo != fObjectMap.end()) {
64 fObjectMap.erase(ppo);
80 ObjectMap_t::iterator ppo = fObjectMap.find(cppobj);
81 if (ppo != fObjectMap.end()) {
84 fObjectMap.erase(ppo);
92 while (!fObjectMap.empty()) {
93 auto elem = fObjectMap.begin();
94 auto cppobj = elem->first;
95 auto klassid = elem->second;
103 auto o =
static_cast<TObject *
>(cppobj);
static bool RecursiveRemove(Cppyy::TCppObject_t cppobj, Cppyy::TCppType_t klass)
static PyObject * RetrievePyObject(Cppyy::TCppObject_t cppobj, PyObject *pyclass)
static void SetUnregisterHook(MemHook_t h)
static void SetRegisterHook(MemHook_t h)
static bool UnregisterPyObject(CPPInstance *pyobj, PyObject *pyclass)
static std::pair< bool, bool > RegisterHook(Cppyy::TCppObject_t, Cppyy::TCppType_t)
Register a hook that Cppyy runs when constructing an object.
TMemoryRegulator()
Constructor.
virtual void RecursiveRemove(TObject *)
Get the class id of the TObject being deleted and run Cppyy's RecursiveRemove.
static ObjectMap_t fObjectMap
void ClearProxiedObjects()
Clean up all tracked objects.
static std::pair< bool, bool > UnregisterHook(Cppyy::TCppObject_t, Cppyy::TCppType_t)
Register a hook that Cppyy runs when deleting an object.
Mother of all ROOT objects.
Set of helper functions that are invoked from the pythonizors, on the Python side.
PyObject * CreateScopeProxy(Cppyy::TCppScope_t)
RPY_EXPORTED bool IsSubtype(TCppType_t derived, TCppType_t base)
RPY_EXPORTED TCppScope_t GetScope(const std::string &scope_name)
std::unordered_map< Cppyy::TCppObject_t, Cppyy::TCppType_t > ObjectMap_t