But you don't need a heap to do that. Atleast not if you only want the one nearest unit.This is a must. I'm trying to create a method that retrieves the closest unit of a group to a point, and doesn't work for multiple groups because the binary heap can't be erased.