GitHub Issue | n/a |
Type | Improvement |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-03-03T20:40:25.000+0000 |
Affected Version/s | Release 1.7.0 |
Fix Version/s | 2014 Sprint 05, 2014 Sprint 05 API, Release 3.2.3, Release 3.3.0 |
Components | iOS |
Labels | 3.2.1, feature, ios, module_app, qe-testadded, rplist, triage |
Reporter | Dawson Toth |
Assignee | Pedro Enrique |
Created | 2011-04-15T03:37:18.000+0000 |
Updated | 2014-03-19T11:13:08.000+0000 |
Problem
Assume you have a web view. When Titanium receives a memory warning, it cleans up the web view, releasing its resources. Now if the app is resumed, the web view will be blank. But a pure JS app has no way of knowing this has happened or handling this event, because we do not expose the didReceiveMemoryWarning event to the
JS side of things.
Solution
Add a global event, "didReceiveMemoryWarning", so that developers can handle this scenario.
Workaround
Create an iOS module that fires this event for the JS to consume.
Associated Helpdesk Ticket
http://developer.appcelerator.com/helpdesk/view/71071
*PUSH* Could someone please address this problem? It needs to be a new EventListener that handles this event. Thank you!
[~hansknoechel] We are relatively packed for our next major feature release in December, but I have tentatively placed it in the following release.
Thank you! It has been noticed, all good!
PR pending: https://github.com/appcelerator/titanium_mobile/pull/5054
PR merged into master
Backport to 3_2_X https://github.com/appcelerator/titanium_mobile/pull/5490
Verified that 'didRecieveMemoryWarning' is exposed to JS as 'memorywarning' event. Testapp used to verify:
To verify: 1. Enter rows around 10000 to generate and check memory to be below 50 mb. 2. An alert should popup when memorywarning event is occured as "low Memory detected !!" Environment used: Device : iPod touch 1 5th Generation, iOS version: 7.0.4 SDK: 3.2.3.v20140318131613 CLI version : 3.2.1 OS : MAC OSX 10.9 Alloy: 1.3.1 ACS: 1.0.14 npm:1.3.2 Appcelerator Studio, build: 3.2.3.201403181115 titanium-code-processor: 1.1.0 XCode : 5.1