CollectionViewPagingLayout icon indicating copy to clipboard operation
CollectionViewPagingLayout copied to clipboard

Question on memory leak

Open daver234 opened this issue 3 years ago • 1 comments

Hi,

I using ScalePageView to show 10 different video that are bundled in the app. In profiling the app with the Xcode Leak Instrument, I see leaks related to PagingCollectionViewController.update and .collectionView.

In the Leak tool, when I double click on the cellForItemAt I get the cell.update....and I see that parent captures self. I'm wondering if this causes a leak when the cell gets dequeued or for some other reason? It could be my implementation that is some how causing this. I did run your sample app in the Leak tool and the same leak does not occur.

Would you have any suggestions and how I can further debug or eliminate this leak?

Thanks, Dave Paging1 pagingCellClick

daver234 avatar Jan 01 '23 03:01 daver234

Hi, thanking for reporting the issue, I can tell the line you mentioned cell.update(value: list[indexPath.row], index: indexPath, parent: self) doesn't cause any memory leak since it's not async, but there might be another cause. Could you send a simple project that reproduces the memory leak issue? I can use that to investigate the problem

amirdew avatar Jan 08 '23 21:01 amirdew