15#include "../../cppyy/CPyCppyy/src/ProxyWrappers.h"
16#include "../../cppyy/CPyCppyy/src/CPPInstance.h"
40 fObjectMap.insert({cppobj, klass});
58 if (
auto it = fObjectMap.find(cppobj); it != fObjectMap.end())
73 if (
auto it = fObjectMap.find(cppobj); it != fObjectMap.end()) {
83 while (!fObjectMap.empty()) {
84 auto elem = fObjectMap.begin();
85 auto cppobj = elem->first;
86 auto klassid = elem->second;
94 auto o =
static_cast<TObject *
>(cppobj);
96 CallCppyyRecursiveRemove(o);
104 fObjectMap.erase(elem);
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)
std::pair< bool, bool > RegisterHook(Cppyy::TCppObject_t, Cppyy::TCppType_t)
Register a hook that Cppyy runs when constructing an object.
TMemoryRegulator()
Constructor.
void CallCppyyRecursiveRemove(TObject *object)
Get the class id of the TObject being deleted and run Cppyy's RecursiveRemove.
void ClearProxiedObjects()
Clean up all tracked objects.
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.
PyObject * CreateScopeProxy(Cppyy::TCppScope_t, const unsigned flags=0)
RPY_EXPORTED bool IsSubtype(TCppType_t derived, TCppType_t base)
RPY_EXPORTED TCppScope_t GetScope(const std::string &scope_name)