Function Karana::Core::sharedPtrClearPyVariable

Function Karana::Core::sharedPtrClearPyVariable#

Function Documentation#

inline void Karana::Core::sharedPtrClearPyVariable(Base &base)#

pybind11 utility used for clearing out a local variable after emptying it out.

This will will do the following. We:

  • Check the refcount to make sure this is the last reference.

  • Get the unique variable name that references the object in the local or global scope.

  • Delete the variable from the appropriate scope.

Parameters:

base – The Base* class that we want to clear.