From: Václav Slavík Date: Fri, 4 Jan 2002 22:51:55 +0000 (+0000) Subject: fixed memory leak when saving XPMs X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/24c41ec5a0a323619b842a0df4e3844e2f9e68e3 fixed memory leak when saving XPMs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/imagxpm.cpp b/src/common/imagxpm.cpp index 07f8ba9750..b8996eaafe 100644 --- a/src/common/imagxpm.cpp +++ b/src/common/imagxpm.cpp @@ -141,6 +141,7 @@ bool wxXPMHandler::SaveFile(wxImage * image, // 3. create color symbols table: wxHashTable table(wxKEY_INTEGER); + table.DeleteContents(TRUE); image->ComputeHistogram(table); char *symbols_data = new char[cols * (chars_per_pixel+1)];