Fixed a memory leak when calculating height of the cells

… by using one offscreen cell for the height calculations