Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yunhanw-google committed Oct 12, 2023
1 parent 7d2c9ce commit bb122fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/support/JniTypeWrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,12 @@ class JniLocalReferenceManager
class JniObject
{
public:
JniObject(JNIEnv * aEnv, jobject aObjectRef) : mEnv(aEnv), mObjectRef(aObjectRef) {}
JniObject(JNIEnv * aEnv, jobject & aObjectRef) : mEnv(aEnv)
{
mObjectRef = aObjectRef;
aObjectRef = nullptr;
}

~JniObject()
{
if (mEnv != nullptr && mObjectRef != nullptr)
Expand Down

0 comments on commit bb122fd

Please sign in to comment.