[
https://issues.apache.org/jira/browse/CB-1751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shazron Abdullah resolved CB-1751.
----------------------------------
Resolution: Not A Problem
This issue tracker is for Cordova API issues only, not custom plugins. Please
post to the PhoneGap Google Groups and cc/me at shazron at gmail dot com, I'll
try to help if I can.
> Cordova 2.1.0 : custom plugin handle memory warning
> ---------------------------------------------------
>
> Key: CB-1751
> URL: https://issues.apache.org/jira/browse/CB-1751
> Project: Apache Cordova
> Issue Type: New Feature
> Components: iOS
> Affects Versions: 2.1.0
> Environment: iOS version 5+
> Reporter: elio d'antoni
> Assignee: Shazron Abdullah
> Priority: Blocker
>
> First of all I'm sorry if writing here is the wrong place but it's really
> hard to find some technical help about cordova.
> Straight to the problem : I have built a custom iOS plugin (basically an
> advanced version of CDVCamera) When the plugin is called, using
> cordova.exec(..), my cameraController is presented as modalController on top
> of mine CDVViewcontroller subclass, using the cameraController my app receive
> some memory warnings that cause the unload of the CDVCordovaView.
> Looking in to the iOS cordova lib code I noted that this scenario is faced by
> CDVViewcontroller by checking if one of the plugin has pending operation and
> if yes the memory is not purged.
> To achieve this the plugin(i.e CDVCamera) use the property hasPendingOperation
> this property is set to true during the plugin lifecycle and to false once
> the operation are finished.
> So inspired by the CDVCamera code I've declared this property and set it to
> true during my capture operations, but didn't work.
> The problem,or at least one of the problems, is that didReceiveMemoryWarning
> is not called on CDVViewController but is called in his subclass and even if
> I call [super didReceiveMemoryWarning] the method of the superClass is not
> called,
> in any case viewDidunload is called on the superClass causing the "freeze" of
> my app.
> So after this long story the question is how can I achieve the behavior of
> CDVCamera in a custom plugin, that is , how avoid the unload of the
> CDVCordovaView during a memory warning.
> Thanks in advance for any help / suggestion
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira