MCPcopy Create free account
hub / github.com/20tab/UnrealEnginePython / ~APyPawn

Method ~APyPawn

Source/UnrealEnginePython/Public/PyPawn.cpp:176–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174
175
176APyPawn::~APyPawn()
177{
178 FScopePythonGIL gil;
179
180 ue_pydelegates_cleanup(py_uobject);
181
182#if UEPY_MEMORY_DEBUG
183 if (py_pawn_instance && py_pawn_instance->ob_refcnt != 1) {
184 UE_LOG(LogPython, Error, TEXT("Inconsistent Python APawn wrapper refcnt = %d"), py_pawn_instance->ob_refcnt);
185 }
186#endif
187 Py_XDECREF(py_pawn_instance);
188
189
190#if UEPY_MEMORY_DEBUG
191 UE_LOG(LogPython, Warning, TEXT("Python APawn (mapped to %p) wrapper XDECREF'ed"), py_uobject ? py_uobject->ue_object : nullptr);
192#endif
193
194 // this could trigger the distruction of the python/uobject mapper
195 Py_XDECREF(py_uobject);
196}

Callers

nothing calls this directly

Calls 1

ue_pydelegates_cleanupFunction · 0.85

Tested by

no test coverage detected