1TICKIT_REF(3) Library Functions Manual TICKIT_REF(3)
2
3
4
6 tickit_ref, tickit_unref - adjust the refcount of the toplevel instance
7
9 #include <tickit.h>
10
11 Tickit *tickit_ref(Tickit *t);
12 void tickit_unref(Tickit *t);
13
14 Link with -ltickit.
15
17 tickit_ref() increments the stored refcount of the given toplevel
18 instance by one. It returns the pointer argument itself, so it is use‐
19 ful for chaining.
20
21 tickit_unref() decrements the stored refcount of the given toplevel
22 instance by one. If the refcount drops to zero, the instance is
23 destroyed. This will release any resources controlled by it and unbind
24 all pending timer and later callbacks, causing them to be invoked with
25 the TICKIT_EV_DESTROY flag if appropriate. This will also decrement
26 refcount on the terminal and root window instances, which will likely
27 cause them to be destroyed too.
28
30 tickit_ref() returns a toplevel instance pointer. tickit_unref()
31 returns no value.
32
34 tickit_new_stdio(3), tickit(7)
35
36
37
38 TICKIT_REF(3)