swift - iOS 10 Quicklook Memory Usage -


when ill load images quicklookcontroller, used memory never freed memory management. example:

override func collectionview(collectionview: uicollectionview, didselectitematindexpath indexpath: nsindexpath) {      let photofile = photos[indexpath.row] photo     currentfilepath = photofile.filepath      let preview = qlpreviewcontroller()     preview.datasource = self     self.navigationcontroller?.pushviewcontroller(preview, animated: false)  }  func documentsdirectoryurl() -> nsurl {     let manager = nsfilemanager.defaultmanager()     let urls = manager.urlsfordirectory(.documentdirectory, indomains: .userdomainmask)     return urls[0] }  func previewcontroller(controller: qlpreviewcontroller, previewitematindex index: int) -> qlpreviewitem {     return documentsdirectoryurl().urlbyappendingpathcomponent(currentfilepath) } 

here ill load image. image size 200kbytes, size of 2500x1250 pixels. memory increased 10 mbytes, when ill close controller (back button) memory still used. every click costs 10 mbytes of additional ram (doesent matter if image same, or new one)

how can force qlpreviewcontroller should free used memory?

edit: seems reported:

https://github.com/jcamiel/radars/blob/6b02382c08cdd9312df325a7a08ea9efeec5727b/28318213/radar.md

https://forums.developer.apple.com/thread/63020

edit2:

tested 2 ipad pro 9.7

first, ios 10.0.1 -> memory increases described above. second, ios 9.3.5 -> no memory issues

so seems ios 10 bug...

seems fixed ios 10.0.2


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -