Skip to content

Commit

Permalink
fix(client): destroy configuration heads
Browse files Browse the repository at this point in the history
When a configuration head goes away (only on configuration destroy) then the
object on the wire must be destroyed too. Otherwise we leak memory.
  • Loading branch information
romangg committed Apr 8, 2023
1 parent 308c9ea commit 558a5ea
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/client/wlr_output_configuration_v1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ namespace Client
{

struct ConfigurationHead {
~ConfigurationHead()
{
if (native) {
zwlr_output_configuration_head_v1_destroy(native);
}
}

WlrOutputHeadV1* head = nullptr;
zwlr_output_configuration_head_v1* native = nullptr;

Expand Down

0 comments on commit 558a5ea

Please sign in to comment.