[ 
https://issues.apache.org/jira/browse/CB-8332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14296010#comment-14296010
 ] 

Patrick Richards commented on CB-8332:
--------------------------------------

I added the @autoreleasepool to the NSData creation code as mentioned but still 
seeing the issue with the sample code unfortunately.

The best way to test it is to try the project with the auto refresh, and use 
the instruments built into Xcode (just the ones in Xcode itself are enough to 
look at) and the memory growing over time. It might not fail on some devices 
with this particular test but does for me on both an iPhone 6 and iPhone 6+. 
(The storage space shouldn’t affect things as we’re looking at RAM usage here, 
but one is 16GB and one is 128GB). Here is a of Xcode screenshot from one run 
today: 
https://www.dropbox.com/s/d3wxj0k9g4jy8w2/Screen%20Shot%202015-01-29%20at%208.18.07%20am.png?dl=0

Could you elaborate by what you mean by the VM problem? Also, are you aware of 
any memory issues related to using iframes?

> Memory leak in loading files from disk with file plugin
> -------------------------------------------------------
>
>                 Key: CB-8332
>                 URL: https://issues.apache.org/jira/browse/CB-8332
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>    Affects Versions: 3.5.0
>         Environment: iOS
>            Reporter: Patrick Richards
>            Assignee: Shazron Abdullah
>
> When loading files from disk, the file plugin appears to leak memory. Using 
> instruments it can be narrowed down to -[CDVFilesystemURLProtocol 
> startLoading], which is in CDVFile.m on line 150.
> (https://github.com/apache/cordova-plugin-file/blob/967ca4d848d6bea0bad5a0d334b8d9f1ea2c4680/src/ios/CDVFile.m#L150)
> To reproduce:
> • have the iOS app download a file using plugin-file-transfer
> • store that file to persistent storage
> • load that file from disk and the app will leak
> We have a very simple proof of concept that downloads a large photo, then 
> constantly refreshes an iFrame which triggers loading the photo from 
> persistent storage. The memory usage of the app climbs over time (with 
> various dips at memory warnings), then crashes due to memory pressure. We can 
> upload this sample project/provide a link if needed – there doesn’t appear to 
> be a way to attach files.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to