aboutsummaryrefslogtreecommitdiff
path: root/src/dillo.cc
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2009-05-31 17:22:07 -0400
committercorvid <corvid@lavabit.com>2009-05-31 17:22:07 -0400
commit292f3cf782f4ea6aefb7b176fa3448f1f7cce1f9 (patch)
treedecc69cb2565859f82681babbcf0a67cf544a040 /src/dillo.cc
parentedb215a2eca45c5ba738fe9629d0fb91ec801d56 (diff)
Bound at-exit memory deallocation
Diffstat (limited to 'src/dillo.cc')
-rw-r--r--src/dillo.cc21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/dillo.cc b/src/dillo.cc
index 238cdb3f..bfcdad48 100644
--- a/src/dillo.cc
+++ b/src/dillo.cc
@@ -38,6 +38,7 @@
#include "bw.h"
#include "misc.h"
#include "nav.h"
+#include "history.h"
#include "dns.h"
#include "web.hh"
@@ -349,5 +350,23 @@ int main(int argc, char **argv)
}
}
- return fltk::run();
+ fltk::run();
+
+ /*
+ * Memory deallocating routines
+ * (This can be left to the OS, but we'll do it, with a view to test
+ * and fix our memory management)
+ */
+ a_Cookies_freeall();
+ a_Cache_freeall();
+ a_Dicache_freeall();
+ a_Http_freeall();
+ a_Dns_freeall();
+ a_History_freeall();
+ a_Prefs_freeall();
+ /* TODO: auth, css */
+
+ //a_Dpi_bye_dpid();
+ MSG("Dillo: normal exit!\n");
+ return 0;
}