Juce, Visual Leak Detector, and StandaloneFilterWindow


I am putting this out in case it helps anyone else.

I was having an issue using Visual Leak Detector and the Juce class standalonefilterwindow - creating an app from scratch via the introjucer to eliminate variables.

Step one is to make sure to put #include "vld.h" before the Juce header files in main.cpp.

Now if you try to compile, the error is with an ambiguous Rectangle function

setBoundsConstrained (Rectangle<int> (x, y, getWidth(), getHeight()));

I changed this to use the juce namespace and all seems fine now.

setBoundsConstrained (juce::Rectangle<int> (x, y, getWidth(), getHeight()));

Fortunately, this seemed to be the only conflict.

I hope this helps someone - and as always I'm interested into any discussion why/why not to use this method, or why it happened in the first place (I do understand the concept of ambiguous function...I just thought this was taken care of).


Thank yall


ps. if yer curious about why I am trying visual leak detector ;] http://www.juce.com/forum/topic/standalonefilterwindow-audiosettingsdialog-memory-leak

I've been using it for a while now, but I have it included after the JUCE header.