Commit e50f27aa authored by Halla Rempt's avatar Halla Rempt

Fix memory leak by making the single K_STATIC_GLOBAL

parent 7d9bbd4e
......@@ -22,6 +22,7 @@
#include "KoMD5Generator.h"
#include <kglobal.h>
KoHashGeneratorProvider *KoHashGeneratorProvider::instance_var = 0;
......@@ -52,8 +53,6 @@ void KoHashGeneratorProvider::setGenerator(QString algorithm, KoHashGenerator *g
KoHashGeneratorProvider *KoHashGeneratorProvider::instance()
instance_var = new KoHashGeneratorProvider();
return instance_var;
K_GLOBAL_STATIC(KoHashGeneratorProvider, s_instance);
return s_instance;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment