titanium-sdk
titanium-sdk copied to clipboard
fix(ios): fixed ref counting of navTintColor
Fixes https://github.com/tidev/titanium-sdk/issues/14211.
Description:
- https://github.com/tidev/titanium-sdk/commit/951877b29c0655a2f2e9d053d25ddfcdf464c7dd created a new issue setting
navTintColorfor a tab group, not for window- in this case
newColorwas set to a new object and was unretained when later released
- in this case
- fixed ref counting through use of a temporary object
newTintColorinside the block to holdnewColor - additionally fixed a potential memory leak by also releasing
newColorifcontroller == nil
Successfully tested with both code examples https://github.com/tidev/titanium-sdk/issues/14211#issue-3023033146 and https://github.com/tidev/titanium-sdk/pull/13917#issue-1909950302 in simulator.
Functional test: I've tested both examples and I don't see any crash with this PR 👍