started with the encapsulation of the data structure which should reduce the number of crashes and help to reduce memory leaks

This commit is contained in:
nemu
2009-10-07 12:26:41 +00:00
parent ea3fc6b037
commit 33222b675c
19 changed files with 657 additions and 649 deletions

View File

@ -725,7 +725,7 @@ void PTheory::MakeCleanAndTidyTheoryBlock(PMsrLines *fullTheoryBlock)
TString str, tidy;
char substr[256];
TObjArray *tokens = 0;
TObjString *ostr;
TObjString *ostr = 0;
int idx = THEORY_UNDEFINED;
for (unsigned int i=1; i<fullTheoryBlock->size(); i++) {
@ -791,13 +791,14 @@ void PTheory::MakeCleanAndTidyTheoryBlock(PMsrLines *fullTheoryBlock)
}
// write tidy string back into theory block
(*fullTheoryBlock)[i].fLine = tidy;
// clean up
if (tokens) {
delete tokens;
tokens = 0;
}
}
// clean up
if (tokens) {
delete tokens;
tokens = 0;
}
}
//--------------------------------------------------------------------------