summaryrefslogtreecommitdiff
path: root/core/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/main.cpp')
-rw-r--r--core/main.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/main.cpp b/core/main.cpp
index 13de647..5a27e20 100644
--- a/core/main.cpp
+++ b/core/main.cpp
@@ -38,3 +38,21 @@ int ACE_MAIN(int argc, char *argv[])
}
+int on_exit()
+{
+ if(!services.empty())
+ {
+ std::list<service*>::iterator end = services.end();
+ for(std::list<service*>::iterator i = services.begin(); i != end; ++i)
+ delete *i;
+ services.clear();
+ }
+ if(!plugins.empty())
+ {
+ std::list<plugin*>::iterator end = plugins.end();
+ for(std::list<plugin*>::iterator i = plugins.begin(); i != end; ++i)
+ delete *i;
+ plugins.clear();
+ }
+ return 0;
+} \ No newline at end of file