am 26f8ce83
: Merge "To avoid the JNI memory leaks in video editor codes"
* commit '26f8ce83e04c4efd10c09bb83cfacdcd154d9450': To avoid the JNI memory leaks in video editor codes
This commit is contained in:
committed by
Android Git Automerger
commit
f96fcd5095
@ -1853,6 +1853,9 @@ videoEditClasses_getEditSettings(
|
||||
// Get the clip settings.
|
||||
videoEditClasses_getClipSettings(pResult, pEnv, clipSettings,
|
||||
&pSettings->pClipList[i]);
|
||||
|
||||
// Free the local references to avoid memory leaks
|
||||
pEnv->DeleteLocalRef(clipSettings);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1877,6 +1880,9 @@ videoEditClasses_getEditSettings(
|
||||
// Get the transition settings.
|
||||
videoEditClasses_getTransitionSettings(pResult, pEnv,
|
||||
transitionSettings, &pSettings->pTransitionList[i]);
|
||||
|
||||
// Free the local references to avoid memory leaks
|
||||
pEnv->DeleteLocalRef(transitionSettings);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1900,6 +1906,9 @@ videoEditClasses_getEditSettings(
|
||||
// Get the effect settings.
|
||||
videoEditClasses_getEffectSettings(pResult, pEnv, effectSettings,
|
||||
&pSettings->Effects[i]);
|
||||
|
||||
// Free the local references to avoid memory leaks
|
||||
pEnv->DeleteLocalRef(effectSettings);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -387,6 +387,9 @@ videoEditJava_getString(
|
||||
(*pLength) = length;
|
||||
}
|
||||
}
|
||||
|
||||
// Delete local references to avoid memory leaks
|
||||
pEnv->DeleteLocalRef(string);
|
||||
}
|
||||
|
||||
// Return the string.
|
||||
|
@ -380,6 +380,9 @@ getClipSetting(
|
||||
pEnv->GetIntField(object,fid);
|
||||
M4OSA_TRACE1_1("videoRotation = %d",
|
||||
pSettings->ClipProperties.videoRotationDegrees);
|
||||
|
||||
// Free the local references to avoid memory leaks
|
||||
pEnv->DeleteLocalRef(clazz);
|
||||
}
|
||||
|
||||
static void jniPreviewProgressCallback (void* cookie, M4OSA_UInt32 msgType,
|
||||
@ -1849,7 +1852,9 @@ videoEditor_populateSettings(
|
||||
"not initialized");
|
||||
if (needToBeLoaded) {
|
||||
getClipSetting(pEnv,properties, pContext->pEditSettings->pClipList[i]);
|
||||
pEnv->DeleteLocalRef(properties);
|
||||
} else {
|
||||
pEnv->DeleteLocalRef(properties);
|
||||
goto videoEditor_populateSettings_cleanup;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user