Skip to content

Release client global mutexes at shutdown - #1025

Open
iibaranov-IG wants to merge 1 commit into
jackaudio:developfrom
iibaranov-IG:fix/client-global-mutex-lifetime
Open

iibaranov-IG wants to merge 1 commit into
jackaudio:developfrom
iibaranov-IG:fix/client-global-mutex-lifetime

Conversation

@iibaranov-IG

Copy link
Copy Markdown

Fixes #1001.

The two process-wide client mutexes are allocated with new but never released. Store them in std::unique_ptr instead, preserving the existing pointer API while registering their destruction at process shutdown.

Validation on current develop:

  • Before: Valgrind reports two still-reachable 56-byte allocations from JackGlobals.cpp (112 bytes total; 10 allocations, 8 frees).
  • After: Valgrind reports in use at exit: 0 bytes in 0 blocks (the same 10 allocations, all 10 freed).
  • The test client loads the freshly built libjack, calls jack_client_open with JackNoStartServer, and exits normally.
  • A full debug build completed with python3 ./waf configure --dbus --classic --debug and python3 ./waf build -j2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JACK clients do not free all allocated memory when closed

1 participant