mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-08 05:24:39 +01:00
fix off-by-one error that probably had me slowly leaking local obj
references for the last few years.
This commit is contained in:
parent
56082d2f7b
commit
b3ca4ee223
2 changed files with 3 additions and 3 deletions
|
@ -687,10 +687,10 @@ void deleteLocalRef( JNIEnv* env, jobject jobj )
|
|||
}
|
||||
|
||||
void
|
||||
deleteLocalRefs( JNIEnv* env, jobject jobj, ... )
|
||||
deleteLocalRefs( JNIEnv* env, ... )
|
||||
{
|
||||
va_list ap;
|
||||
va_start( ap, jobj );
|
||||
va_start( ap, env );
|
||||
for ( ; ; ) {
|
||||
jobject jnext = va_arg( ap, jobject );
|
||||
if ( DELETE_NO_REF == jnext ) {
|
||||
|
|
|
@ -101,6 +101,6 @@ jint jEnumToInt( JNIEnv* env, jobject jenum );
|
|||
XP_U32 getCurSeconds( JNIEnv* env );
|
||||
|
||||
void deleteLocalRef( JNIEnv* env, jobject jobj );
|
||||
void deleteLocalRefs( JNIEnv* env, jobject jobj, ... );
|
||||
void deleteLocalRefs( JNIEnv* env, ... );
|
||||
# define DELETE_NO_REF ((jobject)-1) /* terminates above varargs list */
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue