diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 365a721f1d..ab9ebb4682 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -235,6 +235,7 @@ bool wxXmlResource::Unload(const wxString& filename) { if ( (*i)->File == fnd ) { + delete *i; Data().erase(i); unloaded = true;