Initializing newPtr = 0 in GArray/GPArray.