Template Function Karana::Core::createSharedPtrDiscard#
Defined in File pybind11Utils.h
Function Documentation#
-
template<typename T, typename R, typename ...Args>
auto Karana::Core::createSharedPtrDiscard(R (*f)(Args...))# Registers a discard for a Python object using a shared pointer on create. This works by using a weakref.finalize function that calls the discard method if the use count of the shared pointer is <= 2.
- Parameters:
f – - The function used to create the object.