Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27260] Android: Minor memory leak occurs in runtime every time app relaunches

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2019-10-30T11:16:02.000+0000
Affected Version/sRelease 8.0.0, Release 8.0.1, Release 8.0.2
Fix Version/sRelease 8.3.0
ComponentsAndroid
Labelsandroid, engSchedule, leak, runtime
ReporterJoshua Quick
AssigneeGary Mathews
Created2019-07-19T21:24:44.000+0000
Updated2019-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.

Comments

  1. Gary Mathews 2019-08-15

    8_3_X: https://github.com/appcelerator/titanium_mobile/pull/11153
  2. Samir Mohammed 2019-10-30

    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

JSON Source