Leaked objects (tip and demo plugin)


I sometimes got detected leaked objects using the last tip and the JuceDemoPlugin audiounit.

Here is how to reproduce with reaper :

- Build the audiounit and run reaper.
- create a track (cmd + t)
- insert the JuceDemoPlugin on that track
- remove the plugin (but not the track) (open the track FX window by clicking on the green "FX" button of the track, select the plug, and click 'remove')
- insert again a JuceDemoPlugin on that track
- quit reaper

 

*** Leaked objects detected: 1 instance(s) of class OwnedArray
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 3 instance(s) of class CoreGraphicsImage
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 3 instance(s) of class ImagePixelData
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class TimerThread
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class Thread
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class OwnedArray
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class DisplaySettingsChangeCallback
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class Desktop
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class ComponentAnimator
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class OwnedArray
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class MouseInputSource
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class MouseInputSourceInternal
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class OwnedArray
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class OSXTypeface
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class Typeface
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class TypefaceCache
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 4 instance(s) of class WaitableEvent
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 5 instance(s) of class AsyncUpdater
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 1 instance(s) of class MessageManager
JUCE Assertion failure in juce_LeakedObjectDetector.h:95
*** Leaked objects detected: 3 instance(s) of class Image
JUCE Assertion failure in juce_LeakedObjectDetector.h:95

I think this might be a Reaper thing - if all the plugin instances are shut down correctly, the last one should clean up these global objects. Could be that if Reaper is itself quitting, it just lets the DLLs go without also deleting the objects first.