Function Karana::Core::findVariablesInGc

Function Karana::Core::findVariablesInGc#

Function Documentation#

inline void Karana::Core::findVariablesInGc(py::handle obj, DelFns &del_fns)#

Find variables pointing to obj using gc.

This uses gc.get_referrers to try and find variables that point to the provided Python object.

For every variable found, a delete function is registered for that variable with the del_fns provided.

Parameters:
  • obj – The Python object to search for.

  • del_fns – The DelFns to register delete functions with.