First destroy it, then null it.
A local variable is never a location or a group. It's a pointer to a group, a reference to it. If you give a pointer a new value (null) it's not possible to destroy the "old" handle (unless you have another variable pointing at it, but that should be clear).
First you need to destroy it, for example "call RemoveLocation(tempLoc)" removes the location at which "tempLoc" is pointing at. Now you fixed the leak, but the variable still has the reference to a destroyed object, so you should null it