Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Simplify globals implementation by removing destructors #1915

Merged
merged 1 commit into from Nov 25, 2019

Conversation

emersion
Copy link
Member

@emersion emersion commented Nov 16, 2019

Some globals are static and it doesn't make sense to destroy them before
the wl_display. For instance, wl_compositor should be created before the
display is started and shouldn't be destroyed.

For these globals, we can simplify the code by removing the destructor
and stop keeping track of wl_resources (these will be destroyed with the
wl_display by libwayland).


Breaking change: destructors and resource lists for static globals have been removed.

@emersion emersion added the breaking Breaking change in public API label Nov 16, 2019
@emersion emersion changed the title [RFC] Simplify globals implementation by removing destructors Simplify globals implementation by removing destructors Nov 19, 2019
@emersion emersion force-pushed the remove-global-destructors branch 4 times, most recently from 16d311c to 78330c6 Compare November 23, 2019 17:38
@emersion emersion marked this pull request as ready for review November 23, 2019 17:42
Some globals are static and it doesn't make sense to destroy them before
the wl_display. For instance, wl_compositor should be created before the
display is started and shouldn't be destroyed.

For these globals, we can simplify the code by removing the destructor
and stop keeping track of wl_resources (these will be destroyed with the
wl_display by libwayland).
@emersion
Copy link
Member Author

This is now ready for review.

@ddevault
Copy link
Member

+206 −836 is an excellent patch. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking Breaking change in public API
Development

Successfully merging this pull request may close these issues.

None yet

2 participants