andlabs / andlabs/libui

What's the object ownership model?

Offen
#544 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C
Sterne
10.9k
Forks
612
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

When I create a control and add it to a hierarchy, apparently the parent control takes ownership of the child and ensures that it gets cleaned up properly.

If I create a window and show it with `uiControlShow()`, it seems that libui takes ownership of the window. Maybe because it's been reparented to the conceptual screen?

What happens then if I call `uiControlHide()`? Is the window deparented and therefore mine again, or does libui still keep it? What happens if I then show it once more?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.