diff --git a/docs/changes.txt b/docs/changes.txt index 68ee4728ad..2330662962 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -185,6 +185,7 @@ All: Unix (GUI): - fixed the "close" button of dialogs under KDE 3.1 +- fixed memory leak in wxMimeTypesManager wxBase diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index 23c23a983e..0627dab217 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -1851,6 +1851,10 @@ int wxMimeTypesManagerImpl::AddToMimeData(const wxString& strType, entryOld->AddOrReplaceVerb(verb, entry->GetCmd(i)); } } + + // as we don't store it anywhere, it won't be deleted later as + // usual -- do it immediately instead + delete entry; } } }