Updated to v0.5.0.
Fixed a memory leak within formatNumber() and another within _convertLocalAndGmt(). The ICU Library falsely reports memory leaks via the
Code: Select all
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
...
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); approach. To palliate this I've added a constructor and destructor to call the u_cleanup() function, which deallocates the memory used by the library. My concern is that should the library be used outside of this class then calling this function might cause other problems. In this case the constructor should be used with a false
ICU icu(false) to prevent the destructor from deallocating the ICU Library's memory.