andlabs / andlabs/libui

What's the object ownership model?

Open
#544 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
10.9k
Forks
612
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.