cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lucatorella <...@git.apache.org>
Subject [GitHub] cordova-plugin-wkwebview-engine pull request #17: Avoid retain cycle caused ...
Date Mon, 05 Sep 2016 22:00:57 GMT
GitHub user lucatorella opened a pull request:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/17

    Avoid retain cycle caused by WKUserContentController retaining its message handler

    ### Platforms affected
    iOS
    
    ### What does this PR do?
    This PR breaks the retain cycle caused by WKUserContentController retaining its message
handler. This retain cycle would cause apps that create different CDVViewController instances
to leak memory. For instance if you have a navigation controller, and you push a CDVViewController
instance and then you go back, the view controller just pulled out of the stack is not deallocated.
    
    ### What testing has been done on this change?
    I tested that the message from javascript are still passed. I think it's enough.
    
    ### Checklist
    - [ ] [ICLA](http://www.apache.org/licenses/icla.txt) has been signed and submitted to
secretary@apache.org.
    - [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA
database
    - [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file
paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [ ] Added automated test coverage as appropriate for this change.
    
    …er, to break it we cannot pass directly CDVWKWebViewEngine's instance

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/lucatorella/cordova-plugin-wkwebview-engine feature/avoid-addScriptMessageHandler-leak

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-wkwebview-engine/pull/17.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #17
    
----
commit 1d135e8ffd1556dd6fee49e820fca902bfb59a6a
Author: Luca Torella <luca@scandit.com>
Date:   2016-09-05T21:53:17Z

    Avoid retain cycle: WKUserContentController retains its message handler, to break it we
cannot pass directly CDVWKWebViewEngine's instance

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message