mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
on close and in debug build, print how many strings were loaded
This commit is contained in:
parent
a53951a4f5
commit
b0bf95ea8a
1 changed files with 11 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
/* -*- compile-command: "make -j3 TARGET_OS=wince DEBUG=TRUE RELAY_NAME_DEFAULT=localhost" -*- */
|
||||
/* -*- compile-command: "make -j3 TARGET_OS=wince DEBUG=TRUE"; -*- */
|
||||
/*
|
||||
* Copyright 2009 by Eric House (xwords@eehouse.org). All rights reserved.
|
||||
*
|
||||
|
@ -141,6 +141,9 @@ ceGetResStringL( CEAppGlobals* globals, XP_U16 resID )
|
|||
void
|
||||
ceFreeResStrings( CEAppGlobals* globals )
|
||||
{
|
||||
#ifdef DEBUG
|
||||
XP_U16 nUsed = 0;
|
||||
#endif
|
||||
ResStrStorage* storage = (ResStrStorage*)globals->resStrStorage;
|
||||
if ( !!storage ) {
|
||||
XP_U16 ii;
|
||||
|
@ -148,12 +151,19 @@ ceFreeResStrings( CEAppGlobals* globals )
|
|||
ResStrEntry* entry = storage->entries[ii];
|
||||
if ( !!entry ) {
|
||||
XP_FREE( globals->mpool, entry );
|
||||
#ifdef DEBUG
|
||||
++nUsed;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
XP_FREE( globals->mpool, storage );
|
||||
globals->resStrStorage = NULL;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
XP_LOGF( "%s: %d of %d strings loaded and used", __func__, nUsed,
|
||||
VSIZE(storage->entries) );
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue