mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
Clean up outputs on exit
This commit is contained in:
parent
579909a368
commit
c7f6981d9c
6 changed files with 34 additions and 9 deletions
|
|
@ -14,15 +14,15 @@ struct wlr_output *wlr_output_create(struct wlr_output_impl *impl,
|
|||
return output;
|
||||
}
|
||||
|
||||
void wlr_output_free(struct wlr_output *output) {
|
||||
void wlr_output_destroy(struct wlr_output *output) {
|
||||
if (!output) return;
|
||||
output->impl->destroy(output->state);
|
||||
if (output->make) free(output->make);
|
||||
if (output->model) free(output->model);
|
||||
for (size_t i = 0; output->modes && i < output->modes->length; ++i) {
|
||||
free(output->modes->items[i]);
|
||||
}
|
||||
list_free(output->modes);
|
||||
output->impl->destroy(output->state);
|
||||
free(output);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue