[TIMOB-27260] Android: Minor memory leak occurs in runtime every time app relaunches
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-10-30T11:16:02.000+0000 |
Affected Version/s | Release 8.0.0, Release 8.0.1, Release 8.0.2 |
Fix Version/s | Release 8.3.0 |
Components | Android |
Labels | android, engSchedule, leak, runtime |
Reporter | Joshua Quick |
Assignee | Gary Mathews |
Created | 2019-07-19T21:24:44.000+0000 |
Updated | 2019-10-30T11:16:02.000+0000 |
Description
There is a minor string memory leak in our "V8Runtime.cpp" file that happens every time we launch an app. It happens in our JNI
nativeAddExternalCommonJsModule()
function below...
[V8Runtime.cpp#L379](https://github.com/appcelerator/titanium_mobile/blob/a263a54c3a6b2afa2b909c995eb0c6fb210012d3/android/runtime/v8/src/native/V8Runtime.cpp#L379)
We're calling GetStringUTFChar()
to create a char*
string, but we're missing a call to ReleaseStringUTFChar()
to delete it. This is the leak.
8_3_X: https://github.com/appcelerator/titanium_mobile/pull/11153
Fix verified in SDK version:
8.3.0.v20191028152746
. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/11153