Yes, it's a little tricksy. I deallocate them below, because in the numbering loop I point the cells array at the appropriate array allocate here and then free it when done.