PXListView icon indicating copy to clipboard operation
PXListView copied to clipboard

Memory leak while resizing the window

Open xfer opened this issue 13 years ago • 1 comments

In the demo app (or any app using this code) some leaks appear in Instruments / Activity when you resize the window.

(Looks like the code allocs a LOT of cells on resize, without queuing / dequeuing and do not throw them away)

xfer avatar May 29 '11 17:05 xfer

I ran into this myself. It appears to be the _cellYOffsets array that is allocated in PXListView's cacheCellLayout, but only freed in reloadData. cacheCellLayout is called from a number of places, but the only time the array needs to be reallocated is in reloadData. I moved the allocation to reloadData, just before the call to cacheCellLayout.

martica avatar Jun 03 '11 01:06 martica