var cur is never used
Deleting array variable pData with