I’m getting strange warnings when compiling the amalgamated JUCE on Visual Studio 2008 in debug configuration:
2>juce\juce_amalgamated.h(1891) : warning C4291: 'void *juce::Rectangle::operator new(size_t,void *)' : no matching operator delete found; memory will not be freed if initialization throws an exception
2> juce\juce_amalgamated.h(9601) : see declaration of 'juce::Rectangle::operator new'
2> juce\juce_amalgamated.h(1884) : while compiling class template member function 'juce::Array<ElementType>::Array(const juce::Array<ElementType> &) throw()'
2> with
2> [
2> ElementType=juce::Rectangle
2> ]
2> juce\juce_amalgamated.h(11615) : see reference to class template instantiation 'juce::Array<ElementType>' being compiled
2> with
2> [
2> ElementType=juce::Rectangle
2> ]
2>juce\juce_amalgamated.h(1935) : warning C4291: 'void *juce::Rectangle::operator new(size_t,void *)' : no matching operator delete found; memory will not be freed if initialization throws an exception
2> juce\juce_amalgamated.h(9601) : see declaration of 'juce::Rectangle::operator new'
2> juce\juce_amalgamated.h(1919) : while compiling class template member function 'const juce::Array<ElementType> &juce::Array<ElementType>::operator =(const juce::Array<ElementType> &) throw()'
2> with
2> [
2> ElementType=juce::Rectangle
2> ]
2>juce\juce_amalgamated.h(1891) : warning C4291: 'void *juce::KeyPress::operator new(size_t,void *)' : no matching operator delete found; memory will not be freed if initialization throws an exception
2> juce\juce_amalgamated.h(9309) : see declaration of 'juce::KeyPress::operator new'
2> juce\juce_amalgamated.h(1884) : while compiling class template member function 'juce::Array<ElementType>::Array(const juce::Array<ElementType> &) throw()'
2> with
2> [
2> ElementType=juce::KeyPress
2> ]
2> juce\juce_amalgamated.h(12462) : see reference to class template instantiation 'juce::Array<ElementType>' being compiled
2> with
2> [
2> ElementType=juce::KeyPress
2> ]
I think this may be due to the juce_UseDebuggingNewOperator defining two “new” operators but only a “delete” one (I think the one for deleting arrays is missing, and thus the complaints above).
