You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-8Lines changed: 2 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -808,15 +808,9 @@ Memory management
808
808
809
809
Dealing with 2 different GC's is really challenging.
810
810
811
-
PyActor, PyPawn and PythonComponent automatically DECREF's the mapped classes. This should be enough unless you hold references
812
-
in the python modules themselves. As this would be a bad programming practice, the current approach should be safe enough.
811
+
Starting from release 20180226 a new memory management system has been added (FUnrealEnginePythonHouseKeeper, available here https://github.com/20tab/UnrealEnginePython/blob/master/Source/UnrealEnginePython/Public/PythonHouseKeeper.h). This new system is completely integrated with the Unreal Engine reflection-based GC and will hold track of each ue_PyUObject abd the related UObject to understand when a python object can be safely destroyed.
813
812
814
-
In addition to this, every time a uobject has to return its UObject mapping, it checks for its validity and safety:
815
-
816
-
```c
817
-
#defineue_py_check(py_u) if (!py_u->ue_object || !py_u->ue_object->IsValidLowLevel() || py_u->ue_object->IsPendingKillOrUnreachable())\
818
-
return PyErr_Format(PyExc_Exception, "PyUObject is in invalid state")
819
-
```
813
+
The same system works for delegates, as well as Slate.
0 commit comments