From 6286f890c132b9cd6a36d585735e5d7310dc0abf Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Thu, 29 Dec 2016 10:57:15 +0100 Subject: Sprites, object destruction --- main.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index f9312bd..9f62068 100644 --- a/main.cpp +++ b/main.cpp @@ -8,10 +8,7 @@ #include "global.h" #include "library.h" #include "build/objects.h" - -#include -#include -#include +#include "build/sprites.h" using namespace std; @@ -64,5 +61,9 @@ int main(int argc,char **argv){ Fl::visual(FL_RGB); window->show(argc,argv); Fl::add_timeout(1.0/30,stepcallback); - return Fl::run(); + int ret=Fl::run(); + for(shared_ptr p : global.objects){ + p->destroy(); + } + return ret; } -- cgit v1.2.3-70-g09d2