id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 7379,Boost Format strings causing memory leaks,Jason Vincent ,"James E. King, III","I determined that certain format string used in a boost::wformat object will leak memory. I was using a formatter to convert a value to a floating point value with and without a percent symbol at the end. The two format strings I was using were: {{{ L""%1$.1f"" }}} - format with one decimal place of precision[[BR]] {{{ L""%1$.0f %%"" }}} - format with no decimal places but add a percent sign I determined that removing the ""%%"" reduced some of the memory leaks, and removing the ""$.1f"" or ""$.0f"" eliminated the remaining memory leaks. This was done using Boost v 1.44 with Visual Studio 2010 on Win 7 64-bit. For more context here is part of the code that I can share: note, mFormatter is a boost::wformat member object {{{ MyObject::MyObject() : mNumDecimalPlaces (1), mFormatter (L""%1$.1f"") //--- THIS LEAKED { } std::wstring MyObject::PercentToString(const FLOAT iMin, const FLOAT iMax, const FLOAT iPercent) { FLOAT value = PercentToValue(iMin, iMax, iPercent); return boost::str(mFormatter % value); //--- THIS LEAKED } }}} ",Bugs,closed,Boost 1.66.0,format,Boost 1.44.0,Problem,worksforme,format memory leak,