diff options
author | Simon Ser <contact@emersion.fr> | 2020-06-05 16:43:45 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-06-08 10:12:38 -0600 |
commit | fd0a845cb4c459374051b0109a3ed3c5d3efbd3d (patch) | |
tree | 3b1cf8f03f9f133e407ff96b13b793b6e7d5484f /CONTRIBUTING.md | |
parent | a3ba82885ca038fc1e51775cac7ce5ada3bad0e1 (diff) |
contributing: resource destroy handlers need to cleanup pointers
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e8eb8917..cb75e6d5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -284,6 +284,11 @@ struct wlr_surface *wlr_surface_from_resource(struct wl_resource *resource) { } ``` +If a pointer to a `wl_resource` is stored, a resource destroy handler needs to +be registered to clean it up. libwayland will automatically destroy resources +in an arbitrary order when a client is disconnected, the compositor must handle +this correctly. + ### Destroying resources Object structs should only be destroyed when their resource is destroyed, ie. |