You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.
Firstly, thank you very much for creating such amazing framework, it's really so smooth, so fluent.
When I use ASTableNode/ASCollectionNode, I encountered a memory issue, with the new cell creating, the memory cost will be higher and higher, finally crash the app.
I uses the Facebook official CatDealsCollectionView sample to test the ASTableNode ASCollectionNode memory issue. Finally I found the cells are never dealloc, eg. we have 10,000 cells, ASTableNode will create 10,000 cells, and these cells are both in memory.
When you scroll down the cells, the memory will increase a little by a little. If you scroll down and down, the memory cost will reach up several hundred, even over 1 GB, then crash.
When you scroll down to several thousands cells, then let the iPhone rotate to landscape, the whole table node will block for several seconds, then layout finished, it recovered, then scroll down again, it is still smooth.
@appleguy I know you are crazy busy but I think you're the man to investigate this very serious issue, as the rest of the team is heads-down on other tasks.
@maicki investigated and he found that CoreGraphics is caching CGImages without us asking for it to. We need to prevent this behavior!
EDIT: As context for everyone, it's not the cell nodes that are the core memory issue. It's intended for all 10,000 nodes to stay alive – a node only takes up a tiny amount of memory. The real cost is the CGImages that the nodes set as layer.contents which are cleared – and expected to be destroyed – when the node exits the display range (-clearContents) method. This behavior suggests that those images are not being deallocated as expected.
Firstly, thank you very much for creating such amazing framework, it's really so smooth, so fluent.
When I use ASTableNode/ASCollectionNode, I encountered a memory issue, with the new cell creating, the memory cost will be higher and higher, finally crash the app.
I uses the Facebook official CatDealsCollectionView sample to test the ASTableNode ASCollectionNode memory issue. Finally I found the cells are never dealloc, eg. we have 10,000 cells, ASTableNode will create 10,000 cells, and these cells are both in memory.
When you scroll down the cells, the memory will increase a little by a little. If you scroll down and down, the memory cost will reach up several hundred, even over 1 GB, then crash.
When you scroll down to several thousands cells, then let the iPhone rotate to landscape, the whole table node will block for several seconds, then layout finished, it recovered, then scroll down again, it is still smooth.
But when memory cost 1.3GB, the app crashed.
CatDealsCollectionView.zip
https://github.com/evanxie-cn/AsyncDisplayKit/blob/master/MemoryCrash.MOV
The text was updated successfully, but these errors were encountered: