mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
contributing: resource destroy handlers need to cleanup pointers
This commit is contained in:
parent
a3ba82885c
commit
fd0a845cb4
1 changed files with 5 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue