String::String(float/double) have _locale_t object leak
Tested and reproduced on Window 7 64 Pro Sp1 US.
On Current Juce Trunk.
With Visual Studio 2008 SP1 (project linked with MultiThreaded DLL Runtime library)
In juce_String.cpp
namespace NumberToStringConverters
when JUCE_MSVC is defined the function doubleToString() calls _create_locale without calling requested _free_locale on the returned _locale_t object.
This create a growing leak at each call to String(double) String(float).
The process memory is growing more and more, but Visual Studio did not find any leak at exit.
Calling _free_locale fix this problem.
Thanks to Lori Thantos for its MSDN community additions message pointing that the MSDN sample is leaking too.
http://msdn.microsoft.com/en-us/library/4zx9aht2(v=vs.80).aspx