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
Add control destruction and memory management section
Added section on control destruction and memory management, including recommendations for explicit destruction and specific destruction order for certain controls.
Copy file name to clipboardExpand all lines: README.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -529,6 +529,20 @@ Note: Image display is a feature introduced experimentally in a fork of libui-ng
529
529
- Almost all basic control functions such as `Window`, `Label`, and `Button` are covered.
530
530
- APIs for advanced controls such as `Table` and `Area` are also provided. However, these are still under development and there may still be memory management issues.
531
531
532
+
## Control Destruction and Memory Management
533
+
534
+
The ownership tree mechanism works well for most simple controls, allowing automatic memory deallocation through garbage collection.
535
+
However, due to the unpredictable timing of GC execution, it is advisable to explicitly destroy the main window before `UIng.uninit` performs its memory leak check when in doubt.
536
+
537
+
Some controls require specific destruction order for proper memory cleanup
538
+
-[#6](https://github.com/kojix2/uing/issues/6)
539
+
- Table
540
+
-[#19](https://github.com/kojix2/uing/issues/19)
541
+
- MultilineEntry
542
+
- Tab
543
+
- Grid
544
+
- Area
545
+
532
546
## Limitations
533
547
534
548
libui-ng is cross-platform, but comes with some limitations:
0 commit comments