Leaked OSXTypeface and WindowsDirectWriteTypeface

Hello,
I know that subject wast talked many times, but I 've found the last update from about 4 years ago. And no one thread about both leakages at once, OSXTypeface and WindowsDirectWriteTypeface.

And I have such issue from some time (about 2 weeks ago I found that first time) with leaking OSXTypeface on OSX, and WindowsDirectWriteTypeface on Windows.

And I am not sure if it is after last updates of JUCE libraries, or it’s because some of my code changes.

It happens only when I close host with my plugin, or when I remove my plugin from the host.
Is that something that I should worry?

Even if it’s not a problem, is there any way to avoid such issue?

If you’ve got memory leaks then you’ve created some object(s) using new but not deleted them. If it’s happening when you close the plug-in window then you’ve presumably created an object with new in your PluginEditor class (or one of it’s subcomponents) without deleting it.

Go through your code and make sure you’re properly deleting any objects you create - I’d recommend using smart pointers where you can.

Yes, memory leaks are not good. You need to fix them.

Hello,
great thanks for your support. But the only code where I use new in my projects is in two methods:

AudioProcessorEditor* MyAudioProcessor::createEditor()
{
    return new MyAudioProcessorEditor (*this);
}

and:

AudioProcessor* JUCE_CALLTYPE createPluginFilter()
{
    return new MyAudioProcessor();
}

And both of those methods was created automaticaly by creating JUCE plugin project in Projucer. So I am little bit affraid to change here anything. I believe it’s deeply deliberated.

Also on other thread I found something like that (but it’s from 2014):

So that’s why I am little bit confused, and not sure what to do with that.