Other than pointing out the obvious leaks, i have one comment. Please, when you make variables, please give them better names. If you give them names like "Point" or "Unit", they might overwrite any of the existing variables in the maps we implement them in. This is a little off-topic, but i had this problem with 2 spells that use trigonometry. Their variables had names like "x" or "y" or "i". PLEASE! Give the variables names like this:
<Insert Spell Name Here>_Point