Memory leak in juce_mac_CoreMidi.cpp, setUniqueIdForMidiPort


I just spotted this code which looks like a leak to me:
Inside juce_mac_CoreMidi.cpp, setUniqueIdForMidiPort:
CFURLRef bundleURL = CFURLCreateWithFileSystemPath (kCFAllocatorDefault, appBundle.getFullPathName().toCFString(), kCFURLPOSIXPathStyle, true);

According to juce_String.h the return value of String::toCFString() must be released via CFRelease().

Searching on toCFString() I see suspicious usage in, getValueForText(), line 431 as well.

Thanks for taking a look!


Thanks for reporting!

Great, thanks for fixing!