mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
plug memory leak flushed out by auto-juggle code: null dict doesn't
mean the end of the list.
This commit is contained in:
parent
48ea9e2b28
commit
0c42da905a
1 changed files with 8 additions and 6 deletions
|
@ -477,12 +477,14 @@ makeDict( MPFORMAL JNIEnv *env, JNIUtilCtxt* jniutil, jbyteArray jbytes,
|
||||||
void
|
void
|
||||||
destroyDicts( PlayerDicts* dicts )
|
destroyDicts( PlayerDicts* dicts )
|
||||||
{
|
{
|
||||||
DictionaryCtxt** ctxts = dicts->dicts;
|
int ii;
|
||||||
for ( ; ; ) {
|
DictionaryCtxt** ctxts;
|
||||||
if ( !*ctxts ) {
|
|
||||||
break;
|
for ( ctxts = dicts->dicts, ii = 0;
|
||||||
|
ii < VSIZE(dicts->dicts);
|
||||||
|
++ii, ++ctxts ) {
|
||||||
|
if ( NULL != *ctxts ) {
|
||||||
|
dict_destroy( *ctxts );
|
||||||
}
|
}
|
||||||
dict_destroy( *ctxts );
|
|
||||||
++ctxts;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue