I'm not sure if anything I'm saying here is correct, but to know if something leaks, you need to see to the variable.
There are 2 types of variables: basic variables (reals, integers, strings) and "mixed" variables, aka Handles. The last type of variable works like this:
The variable itself (such as TempPoint being a location variable) is a pointer. Pointers are 4 bytes of memory that "point" to the location inside the memory of the "contents". Those contents basically are a set of "basic" variables. For instance: the point variable itself is a 4 byte pointer. It points to a set of 3 numbers: real x, real y, real z.
Functions such as GetLocationX(loc) are internally programmed to look at the memory the locationvariable is "pointing at", and then return the corresponding "real x".
Functions such as RemoveLocation(loc) clean up the "contents" of the pointer variable, in this example removing real x, real y and real z from the memory.
If you only do this:
set locationvar = null
Then you basically remove the "pointer" variable (thus the 4 bytes reference to the actual location). This means there's still a real x, y and z somewhere in the memory you haven't removed, and you'll never be able to remove because you just nulled the referencing locationvar pointer. As you can understand, you really don't want to have hundreds of useless x, y and z reals in your memory.
Whenever you create a locationvariable (or set the variable to GetEventLocation or something), you create a pointer AND the 3 corresponding x, y, z reals.
Another example would be a "unit" variable. Unlike the locationvariable, unit variables solely are "pointers". If you assign a unit variable to a unit, no new unit will be created (unlike point variables) on the map, but the unit variable will be "pointing" to the contents of this unit. Using GetUnitState(), you look to the piece of memory the unit pointer is "pointing" at, then look up the specific unit state, for example UNIT_STATE_LIFE. Thus, if you do:
set unitvar = null
all you do is setting the pointer reference to null. This means that the unit itself is still in the memory! In this case it'd be good, because otherwise the unit would simply disappear from the map... Units are automatically cleaned when they decayed, unlike points who stay in the memory until you tell them to be removed. The function RemoveUnit does the same as RemoveLocation.
A unit is more complex than a location, obviously. It needs to store much more information, thus will be a bigger leak (although units luckily are automatically removed when they decayed) if reference to them would be lost.
If you have much memory (e.g. 2 gig ram), you won't really feel a 1 kb leak, or many small leaks. However, not everyone has a good computer. Remember that the minimum specifications for wc3 is still 128Mb ram. While I do agree that those people should at least upgrade, leaks aren't good on any computer, so just fix em!
Last example would be a Unit Group. Again, this is just hypothetically speaking because I don't know if I'm completelly correct, but:
a unit group basically is a pointer to some sort of list. This list itself contains pointers as well! Only, these pointers are unit variables. The FirstOfGroup function basically looks into the memory the unit group is refering at, then looks at the first variable in the list, and returns this. The returned variable again is no more than 4 bytes, because it's a pointer. This pointer is a unit pointer, which is pointing to one of the units in the game.
nulling a pointer variable (nulling unit, location, group, ...) sets its value to 0. 0 is the default value of a variable which means it's pointing to "nowhere". When you use a pointer pointing to "nowhere", you basically use nothing. If you want to kill a "null" unit, well, you basically kill "nothing"...
If you try to use RemoveLocation on a "null" location, the function will detect the location is pointing to "nowhere", thus it can't clean up any contents (real x, real y, real z) anymore. In JNGP, a message will pop up saying "double free location", meaning you're trying to clean up an empty variable.
If you're unsure whether a variable is leaking or not, ask yourself if it could possibly be a pointer, or if it's simply a basic value. If it's a pointer, it'll be leaking its contents if you don't remove it properly.µ
If something I said is wrong, please correct me