Nullify deleted global refs to force recreation. sync
authorHussein Kasem <huss@pep-project.org>
Mon, 08 Apr 2019 12:06:10 +0200
branchsync
changeset 512133c3c838160
parent 511 4e48df1c6ced
child 513 6fdf5ea9af03
Nullify deleted global refs to force recreation.
src/org_pEp_jniadapter_AbstractEngine.cc
     1.1 --- a/src/org_pEp_jniadapter_AbstractEngine.cc	Fri Apr 05 15:50:04 2019 +0200
     1.2 +++ b/src/org_pEp_jniadapter_AbstractEngine.cc	Mon Apr 08 12:06:10 2019 +0200
     1.3 @@ -198,11 +198,11 @@
     1.4          PEP_STATUS status = PEP_STATUS_OK;
     1.5  
     1.6          #ifdef DISABLE_SYNC
     1.7 -                _messageToSend = messageToSend;
     1.8 -                session();
     1.9 +           _messageToSend = messageToSend;
    1.10 +           session();
    1.11                  
    1.12          #else 
    1.13 -                startup<JNISync>(messageToSend, notifyHandshake, o, &JNISync::startup_sync, &JNISync::shutdown_sync);
    1.14 +            startup<JNISync>(messageToSend, notifyHandshake, o, &JNISync::startup_sync, &JNISync::shutdown_sync);
    1.15          #endif
    1.16      }
    1.17  
    1.18 @@ -218,6 +218,11 @@
    1.19          env->DeleteGlobalRef(engineClass);
    1.20          env->DeleteGlobalRef(obj);
    1.21  
    1.22 +        identityClass = NULL;
    1.23 +        signalClass = NULL;
    1.24 +        engineClass = NULL;
    1.25 +        obj = NULL;
    1.26 +
    1.27          session(pEp::Adapter::release);
    1.28          delete o;
    1.29      }