Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26783] iOS: Memory leak in require

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2019-03-28T13:43:29.000+0000
Affected Version/sRelease 8.0.0
Fix Version/sRelease 8.0.1
ComponentsiOS
Labelsn/a
ReporterJan Vennemann
AssigneeJan Vennemann
Created2019-01-30T17:58:27.000+0000
Updated2019-03-28T13:43:29.000+0000

Description

*Steps to reproduce the behavior*

Create a new classic project and replace Resources/app.js content with the following code:

const win = Ti.UI.createWindow();
const label = Ti.UI.createLabel({ text: 'test require' });
label.addEventListener('click', () => require('test'));
win.add(label);
win.open();

Create a new file Resources/test.js with the following content:

export const value = 1;

Build the app and open Instruments. Choose the Leaks template and start recording the running test app, then switch into the "Leak Checks" view.

Repeatedly click on the label.

*Actual behavior* Memory leaks will show up for tryFile and NSString stringByAppendingString: *Expected behavior* No memory leaks are shown.

Comments

  1. Jan Vennemann 2019-01-30

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/10659 PR (8_0_X): https://github.com/appcelerator/titanium_mobile/pull/10660
  2. Christopher Williams 2019-03-15

    PRs have been merged to master/8_0_X.
  3. Samir Mohammed 2019-03-21

    The memory leaks have definitely decreased but on the new SDK builds their still seems to be 25 leaks according to instruments (Down from 445 though).
  4. Jan Vennemann 2019-03-21

    Are those related to the leaks described here or in TIMOB-26811? If not please open a separate ticket and include Instrument leak data so we can tackle them separately, thanks!
  5. Samir Mohammed 2019-03-28

    *Closing ticket*, fix verified in SDK version 8.1.0.v20190325115012 and SDK Version 8.0.1.v20190327083138 No memory leaks are being shown when repeatedly clicking on the table. *Test and other information can be found at:* PR (master): https://github.com/appcelerator/titanium_mobile/pull/10659 PR (8_0_X): https://github.com/appcelerator/titanium_mobile/pull/10660

JSON Source