MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / lean_obj_handle_dealloc

Function lean_obj_handle_dealloc

LeanPy/native/python_bridge.c:1079–1089  ·  view source on GitHub ↗

tp_dealloc: release the lean_object ref and free the instance. */

Source from the content-addressed store, hash-verified

1077 PyObject *ob_type;
1078 lean_object *ptr; /* owned reference */
1079} LeanObjHandle;
1080
1081/* Slots for the heap type created via PyType_FromSpec. */
1082
1083/* METH_NOARGS = 0x0004 */
1084#define LEAN_METH_NOARGS 0x0004
1085
1086/* tp_dealloc: release the lean_object ref and free the instance. */
1087static void lean_obj_handle_dealloc(PyObject *self) {
1088 LeanObjHandle *h = (LeanObjHandle *)self;
1089 if (h->ptr) {
1090 lean_dec(h->ptr);
1091 h->ptr = NULL;
1092 }

Callers

nothing calls this directly

Calls 1

lean_decFunction · 0.85

Tested by

no test coverage detected