| 174 | |
| 175 | |
| 176 | APyPawn::~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 | } |
nothing calls this directly
no test coverage detected