Open rlam3 opened 7 years ago
Are you using the dequeueing mechanism of UICollectionView? And are you removing objects from myArrayOfObjects
when they've moved off-screen? You could also profile your app with Instruments to see where the memory's gone. Lastly, I'd look into Realm for managing large amounts of data. Only keep in memory what's directly on screen. Haneke is generally used for caching data that's either requested from an indirect source, like a web image, or something that's resource-intensive or processed. It looks like you need to off-hand data to disk, not to memory.
I'm using an API to pull JSON url objects back to my app and then mapping these object urls onto my cell with hanekeswift to simply set the image onto the cell. But I'm getting memory warning issues that may be related to hanekeswift or how hanekeswift is managing cache....
The following is a simple pseudo code of my code...
API call -> returns Objects in App -> append objects back into array of view controller -> reloadData -> Load cells with proper images and URL... -> If next pagination, repeat...
I remember reading how haneke is automagically managing my cache of these images... But I'd like to know if this would be a smart way of
I see that when my memory reaches above using 1GB ... the app crashes on my iPad but not my simulator because my PC has more memory to spare than does my iPad....
However, I'm looking for a solution to see if HanekeSwift can help me find a better way of managing my objects and then load them into the necessary cells with the proper images and url. I'm not too sure if this would be the most efficient way to handle image caching and my arrays together like this... Would love the insight on this.
Thanks!