author | erik <erik> | 2007-01-19 01:12:38 (UTC) |
---|---|---|
committer | erik <erik> | 2007-01-19 01:12:38 (UTC) |
commit | 1ab92f1d2b346de7da8ca5c3aaa6bc75b43981e7 (patch) (side-by-side diff) | |
tree | af4a12bc46e25853386dc53868b869e1bf05d863 /inputmethods | |
parent | 2b45dc71e79a3eb7d4e8553273c9bc4f4282d50a (diff) | |
download | opie-1ab92f1d2b346de7da8ca5c3aaa6bc75b43981e7.zip opie-1ab92f1d2b346de7da8ca5c3aaa6bc75b43981e7.tar.gz opie-1ab92f1d2b346de7da8ca5c3aaa6bc75b43981e7.tar.bz2 |
Every single file in this commit had a memory leak where a resource is
allocated in the constructor but not de-allocated in the destructor.
This commit fixes that.
-rw-r--r-- | inputmethods/dasher/PPMLanguageModel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inputmethods/dasher/PPMLanguageModel.cpp b/inputmethods/dasher/PPMLanguageModel.cpp index 137b07f..d767d16 100644 --- a/inputmethods/dasher/PPMLanguageModel.cpp +++ b/inputmethods/dasher/PPMLanguageModel.cpp @@ -61,3 +61,3 @@ CPPMLanguageModel::CPPMnode * CPPMLanguageModel::CPPMnode::add_symbol_to_node(in CPPMLanguageModel::CPPMLanguageModel(CAlphabet *_alphabet,int _normalization) - : CLanguageModel(_alphabet,_normalization) + : CLanguageModel(_alphabet,_normalization), root(0), m_rootcontext(0) { @@ -70,2 +70,3 @@ CPPMLanguageModel::~CPPMLanguageModel() { + delete m_rootcontext; delete root; |