MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / py_dealloc_generic

Function py_dealloc_generic

imperative/python/src/ops.cpp:113–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111
112template <typename T>
113void py_dealloc_generic(PyObject* obj) {
114 reinterpret_cast<T*>(obj)->op.reset();
115 Py_TYPE(obj)->tp_free(obj);
116}
117
118template <typename T, typename U, U T::Ty::*attr>
119PyObject* py_get_generic_impl(PyObject* obj, void* /* closure */) {

Callers

nothing calls this directly

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected