summaryrefslogtreecommitdiff
path: root/inputmethods
authorerik <erik>2007-01-19 01:12:38 (UTC)
committer erik <erik>2007-01-19 01:12:38 (UTC)
commit1ab92f1d2b346de7da8ca5c3aaa6bc75b43981e7 (patch) (unidiff)
treeaf4a12bc46e25853386dc53868b869e1bf05d863 /inputmethods
parent2b45dc71e79a3eb7d4e8553273c9bc4f4282d50a (diff)
downloadopie-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.
Diffstat (limited to 'inputmethods') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/dasher/PPMLanguageModel.cpp3
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
@@ -59,7 +59,7 @@ CPPMLanguageModel::CPPMnode * CPPMLanguageModel::CPPMnode::add_symbol_to_node(in
59///////////////////////////////////////////////////////////////////// 59/////////////////////////////////////////////////////////////////////
60 60
61CPPMLanguageModel::CPPMLanguageModel(CAlphabet *_alphabet,int _normalization) 61CPPMLanguageModel::CPPMLanguageModel(CAlphabet *_alphabet,int _normalization)
62 : CLanguageModel(_alphabet,_normalization) 62 : CLanguageModel(_alphabet,_normalization), root(0), m_rootcontext(0)
63{ 63{
64 root=new CPPMnode(-1); 64 root=new CPPMnode(-1);
65 m_rootcontext=new CPPMContext(root,0); 65 m_rootcontext=new CPPMContext(root,0);
@@ -68,6 +68,7 @@ CPPMLanguageModel::CPPMLanguageModel(CAlphabet *_alphabet,int _normalization)
68 68
69CPPMLanguageModel::~CPPMLanguageModel() 69CPPMLanguageModel::~CPPMLanguageModel()
70{ 70{
71 delete m_rootcontext;
71 delete root; 72 delete root;
72} 73}
73 74