I'm using the FileChooser class to load files in my app.
When I quit the app (using Cmd+Q on Mac) while the FileChooser dialog is open, I get an assertion failure with the output:
*** Leaked objects detected: 1 instance(s) of class FileChooser
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
I'm using the FileChooser as a local stack variable, as described in the documentation:
FileChooser chooser(title, path, filePatterns);
// do something with chooser.getResult()
I'm not holding on to the FileChooser anywhere else. I have had the same problem with AlertWindows, but I solved it there ModalComponentManager::Callback and showing the window asynchronously. How can I solve this problem for the FileChooser?
Note that this only happens when running from Xcode. When I run the app from Finder, it quits without a crash.