Started documenting object lifetimes.

This commit is contained in:
Pietro Gagliardi 2015-04-19 01:29:22 -04:00
parent 1c3105d669
commit 085e06d054
1 changed files with 28 additions and 0 deletions

28
docs/lifetimes.md Normal file
View File

@ -0,0 +1,28 @@
# Object lifetimes
Know them.
One of the more annoying parts of libui is that it has to juggle an OS control handle and at least one C data structure for a single uiControl, uiParent, uiWindow, etc. To that end, this document exists to lay the ground rules for object lifetimes.
## To end programmers
## Implementation
Note that control implementations generally don't need to worry about backend-specific information; these are handled by the backends's convenience functions. If you bypass those, however, you *will* need to worry.
### Backend-Agnostic (uiBox, uiGrid)
### Windows
TODO write a lifetimes.c
### Unix
see os x section
TODO write a lifetimes.c
### Mac OS X
notes about not monitoring references or destruction here
do the whole "keep a reference around" thing
TODO drop the deleted controls view