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
Various components and APIs that are specific to C# language use `Dispose()` pattern and implement `IDisposable` interface for convenience. For example:
95
+
*`Control` - GUI controls use `Dispose` method to destroy UI element,
96
+
*`InputAxis`/`InputEvent` - virtual input reading utility has to be released via `Dispose`,
97
+
98
+
### C++
99
+
100
+
* Use utility macros: `SAFE_DISPOSE`, `SAFE_RELEASE`, `SAFE_DELETE` to cleanup objects, depending on the method to call.
101
+
* Graphics objects such as `GPUTexture` or `GPUBuffer` can be cleared via `SAFE_DELETE_GPU_RESOURCE` macro. Those are normal scripting objects but invoking `ReleaseGPU` beforehand helps to reduce memory pressure when unused.
102
+
*`Task` system uses automatic auto-destruction of past tasks. There is no need to manually destroy objects after use.
0 commit comments