Added base class for button listening

Fixed a few memory leaks
This commit is contained in:
andreja6
2018-04-20 18:55:55 -07:00
parent a91bc4c5b5
commit 19913cb665
6 changed files with 68 additions and 6 deletions

View File

@@ -340,7 +340,9 @@ void Demo::onInit() {
void clearInstances()
{
for(size_t i = 0; i < instances.size(); i++)
{
delete instances.at(i);
}
delete dataModel;
}
void OnError(int err, std::string msg = "")
@@ -354,10 +356,15 @@ void OnError(int err, std::string msg = "")
void Demo::onCleanup() {
clearInstances();
go->~Texture();
go_ovr->~Texture();
go_dn->~Texture();
app->sky->~Sky();
}
void Demo::onLogic() {
// Add non-simulation game logic and AI code here
}
@@ -704,8 +711,6 @@ int main(int argc, char** argv) {
settings.window.defaultIconFilename = GetFileInPath("/content/images/rico256c.png");
settings.window.resizable = true;
settings.writeLicenseFile = false;
App app = App(settings);
//app.window()->setIcon(ExePath() + "/content/images/rico.png");
app.run();
App(settings).run();
return 0;
}