[TIMOB-26783] iOS: Memory leak in require
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-03-28T13:43:29.000+0000 |
Affected Version/s | Release 8.0.0 |
Fix Version/s | Release 8.0.1 |
Components | iOS |
Labels | n/a |
Reporter | Jan Vennemann |
Assignee | Jan Vennemann |
Created | 2019-01-30T17:58:27.000+0000 |
Updated | 2019-03-28T13:43:29.000+0000 |
Description
*Steps to reproduce the behavior*
Create a new classic project and replace
Create a new file
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 fortryFile
and NSString stringByAppendingString:
*Expected behavior*
No memory leaks are shown.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/10659 PR (8_0_X): https://github.com/appcelerator/titanium_mobile/pull/10660
PRs have been merged to master/8_0_X.
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).
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!
*Closing ticket*, fix verified in SDK version
8.1.0.v20190325115012
and SDK Version8.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