Tracking a leaking thread

Hi guys,

on a new project I’m working on, every now and then, I get an assert triggered when closing the plugin instance. It’s about a thread leaking. The assert debug message only shows me that the leaking class is juce::Thread, but I’m having hard time to identify which of my derived classes is causing this leak.

For now, I’m trying using the heavy weight leak detector on the suspect classes, but I don’t know if there’s a better way to do that.

Thank you in advance!
Luca

Just in case you are not aware: In the debugger you can click “Continue” and you will get further leak messages of the enclosing class.

If you added JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR or just JUCE_LEAK_DETECTOR to your class declaration, your own class will show up sooner or later in that list.

1 Like