cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-11409) iOS memory warning's automated release could be optional
Date Fri, 17 Jun 2016 09:19:05 GMT


ASF GitHub Bot commented on CB-11409:

GitHub user tbrebant opened a pull request:

    CB-11409: (iOS) New method allowing to disable automated memory release on memoryWarning

    ### Platforms affected
    ### What does this PR do?
    It is adding a method allowing the user to disable (and re-enable) the automated resource
releasing when a memory warning is received on iOS. Why? Because user may want to handle memory
warnings by himself (such as releasing other less important resource first).
    This method is static, on the class:
    // Here comes custom code to handle memoryWarnings
    ### What testing has been done on this change?
    - Played multiple (non streaming) audio files after having disabled the auto-release and
while having some heavy memory process running, until a memoryWarning is received: audio continue
to play.
    - Played multiple (non streaming) audio files with the auto-release enabled and while
having some heavy memory process running, until a memoryWarning is received: audio stops.
    Ran the integrated tests. Before doing any change (version 2.3.1-dev) the result was:
    ![cordova-media-plugin 2 3 1-dev](
    After the change the result is exactly the same:
    All tests was made with an iPad2 on iOS8.4.
    ### Checklist
    - [x] [ICLA]( has been signed and submitted to
    - [x] [Reported an issue]( in the JIRA
    - [x] 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.
    About the last point: tests will come as soon as possible, meanwhile please have a look
at the code and review it! Thank you.

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

    $ git pull CB11409

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

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

    This closes #101
commit eca1d6342cdda64d73235b1ae5658bc87619ba54
Author: tbrebant <>
Date:   2016-06-14T09:09:54Z

    CB-11409: (iOS) Added a method to disable automated memory releasing when a memoryWarning
is received


> iOS memory warning's automated release could be optional
> --------------------------------------------------------
>                 Key: CB-11409
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Plugin Media
>         Environment: iOS
>            Reporter: Thibaut Brebant
>            Priority: Minor
>              Labels: media, memory, warning
> It would be great to have an option to control if whether or not the user wants to release
all audio resources when a Memory Warning is received on iOS.
> User may want to have a better control of what is happening when a memory warning is
received, such as releasing other resources first, and eventually, manually, request for a
resource release.
> Maybe something like:
> {code}
> Media.setAutoReleaseOnMemWarning(true/false);
> {code}

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message