Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26475] Adding willclose event on window

GitHub Issuen/a
TypeNew Feature
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsios
ReporterAni Sinanaj
AssigneeEric Merriman
Created2018-09-05T14:23:27.000+0000
Updated2018-10-20T22:31:22.000+0000

Description

What happened:

Index

Added a map to a secondary window

Added many annotations to the map with a custom view each

Running the app:

* From the index, I open the secondary window containing the map. I let it load some annotations, then go back.

* The app crashes

From the logs, it read that some objects were not cleaned before closing the window. Listening to the close event didn't work since it is fired after the window has closed. Added a willclose event to do all the cleanup before actually closing the window. Commit https://github.com/caffeinalab/titanium_mobile/commit/849717ced4f7a0b7c33439a70c7cac056b33400d PR to come

Comments

  1. Hans Knöchel 2018-09-05

    It looks like rather Ti.Map should be improved to handle this than a new, iOS-only event. Also, the "blur" event comes pretty close to this state, which is called before the "close" event.
  2. Ani Sinanaj 2018-09-06

    If I remember correctly, I tried the blur event and it didn't resolve my issue. Probably improving Ti.Map would be necessary, nevertheless I think exposing willclose isn't a bad idea. It may be useful.

JSON Source