summaryrefslogtreecommitdiff
path: root/src/categories.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/categories.cpp')
-rw-r--r--src/categories.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/categories.cpp b/src/categories.cpp
index 62ba3ca5..c084c238 100644
--- a/src/categories.cpp
+++ b/src/categories.cpp
@@ -43,6 +43,7 @@ QString CategoryFactory::categoriesFilePath()
CategoryFactory::CategoryFactory()
{
+ atexit(&cleanup);
reset();
QFile categoryFile(categoriesFilePath());
@@ -124,6 +125,12 @@ void CategoryFactory::setParents()
}
}
+void CategoryFactory::cleanup()
+{
+ delete s_Instance;
+ s_Instance = NULL;
+}
+
void CategoryFactory::saveCategories()
{