steinbergmedia / vstgui

A user interface toolkit mainly for audio plug-ins
Other
880 stars 124 forks source link

Fix leak in CNewFileSelector::run (CallbackFunc&& callback) #286

Closed nickdowell closed 1 year ago

nickdowell commented 1 year ago

CNewFileSelector objects were being leaked when using run (CallbackFunc&&) because of a retain cycle; the lambda assigned to impl->doneCallback added a SharedPointer to this that would never be freed.

Verified by adding a breakpoint on CNewFileSelector::~CNewFileSelector()