diff --git a/clients/jack_client.cpp b/clients/jack_client.cpp index c6bc369e..7495b643 100644 --- a/clients/jack_client.cpp +++ b/clients/jack_client.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include using namespace std::literals; @@ -253,8 +254,10 @@ int main(int argc, char** argv) signal(SIGTERM, done); signal(SIGQUIT, done); - while (!shouldClose) - sleep(1); + while (!shouldClose){ + synth.garbageCollect(); + std::this_thread::sleep_for(1s); + } std::cout << "Closing..." << '\n'; jack_client_close(client);