apakclose() resets the freed pointer