Commit 302fbbb
committed
context: automatically destroy context
When the last reference on the struct ly_ctx pointer is lost, make sure
that ly_ctx_destroy is called. Obviously, only do that if the pointer
was allocated by us. If the pointer was borrowed, do not call
ly_ctx_destroy.
Signed-off-by: Robin Jarry <robin.jarry@6wind.com>1 parent d164c08 commit 302fbbb
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
61 | 64 | | |
62 | 65 | | |
63 | 66 | | |
64 | | - | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
0 commit comments