diff --git a/FiestaOnlineEditor/FiestaOnlineEditor.cpp b/FiestaOnlineEditor/FiestaOnlineEditor.cpp index 8bb5da7..e645d31 100644 --- a/FiestaOnlineEditor/FiestaOnlineEditor.cpp +++ b/FiestaOnlineEditor/FiestaOnlineEditor.cpp @@ -186,6 +186,7 @@ bool FiestaOnlineEditor::OnUserUpdate(float fElapsedTime){ focusErased=true; } w->Cleanup(); + delete w; return true; } else { return false; diff --git a/FiestaOnlineEditor/ItemEditor.cpp b/FiestaOnlineEditor/ItemEditor.cpp index 9f4ff0c..6ccfdf0 100644 --- a/FiestaOnlineEditor/ItemEditor.cpp +++ b/FiestaOnlineEditor/ItemEditor.cpp @@ -3,6 +3,8 @@ ItemEditor::ItemEditor(FiestaOnlineEditor*pge,std::string windowTitle,vi2d pos,vi2d size) :Window(pge,windowTitle,pos,size){} +ItemEditor::~ItemEditor(){}; + void ItemEditor::Load(std::string basePath){ ItemInfo.Load(basePath+"/ItemInfo.shn"); } diff --git a/FiestaOnlineEditor/ItemEditor.h b/FiestaOnlineEditor/ItemEditor.h index 27feff2..259bf30 100644 --- a/FiestaOnlineEditor/ItemEditor.h +++ b/FiestaOnlineEditor/ItemEditor.h @@ -10,6 +10,7 @@ class ItemEditor:public Window{ vf2d pos={64,64}; public: ItemEditor(FiestaOnlineEditor*pge,std::string windowTitle,vi2d pos,vi2d size); + ~ItemEditor(); void Load(std::string basePath); void Refresh(FiestaOnlineEditor*pge)override; void Update(FiestaOnlineEditor*pge,float fElapsedTime)override; diff --git a/FiestaOnlineEditor/Window.cpp b/FiestaOnlineEditor/Window.cpp index 37dad3f..566274a 100644 --- a/FiestaOnlineEditor/Window.cpp +++ b/FiestaOnlineEditor/Window.cpp @@ -10,6 +10,8 @@ Window::Window(FiestaOnlineEditor*pge,std::string windowTitle,vi2d pos,vi2d size //InternalRefresh(pge); } +Window::~Window(){}; + void Window::InternalUpdate(FiestaOnlineEditor*pge,float fElapsedTime){ if(this==focusedWindow){ Update(pge,fElapsedTime); diff --git a/FiestaOnlineEditor/Window.h b/FiestaOnlineEditor/Window.h index c2b7ff6..c2b736c 100644 --- a/FiestaOnlineEditor/Window.h +++ b/FiestaOnlineEditor/Window.h @@ -19,6 +19,7 @@ protected: std::string windowTitle=""; public: Window(FiestaOnlineEditor*pge,std::string windowTitle,vi2d pos,vi2d size); + virtual ~Window(); void InternalUpdate(FiestaOnlineEditor*pge,float fElapsedTime); virtual void Update(FiestaOnlineEditor*pge,float fElapsedTime)=0; virtual void Refresh(FiestaOnlineEditor*pge)=0;