leak in LookAndFeel::drawFileBrowserRow() ?


#1

juce::LeakedObjectDetector<juce::ColourGradient>::LeakCounter *    0x104f9d10


I tracked it down a bit, and found its origin in : LookAndFeel::drawFileBrowserRow()
(I got a ScopedPointer<FileTreeComponent>)
and more precisely because of the following :


…
    else
    {
        if (const Drawable* d = isDirectory ? getDefaultFolderImage()
                                            : getDefaultDocumentFileImage())
            d->drawWithin (g, Rectangle<float> (2.0f, 2.0f, x - 4.0f, height - 4.0f),
                           RectanglePlacement::centred | RectanglePlacement::onlyReduceInSize, 1.0f);
    }
…


If I remove it, I haven't got anymore leak.

Any idea ?
 


#2

No, that code is correct, and there's no leak there.

Most likely you're leaking your LookAndFeel object.


#3

That was it! 

thanks!