Fix memory leak in TMap.