Perhaps I can enlighten a couple of things.
Whenever you use a point function, you don't actually leak memory. You create an object in your memory that you are not going to use afterwards, and basically lose track of because you didn’t save the reference label(integer number) referring to the object in memory anywhere.
Thus we speak of a missing object in your memory that is not serving any purpose.
Now back to the explanation.
What the function does is, it destroys a location object that is created in your memory.
You could somewhat compare it with Unit - Remove Unit.
Now you might wonder, ok why do I have to remove an object? I don't go around removing units right!?
Well, no cause most of the time you are using your units, and they are sitting there on your map anyway, so you’ll notice.
Point (objects) are slightly different. You can’t see them on your map, but they do get made automatically by the editor. Whenever you call a point function it basically returns you an instance of that object.
Now there is not something particularly bad with this. The catch however is that it will create 2 separate point objects in your memory when you have 2 identical actions that retrieve the same location through the same function.
-
Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
-
Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
So you create 2 unit objects (which is what you asked), but the editor also creates two location objects. The fact that two location objects are made is not that bad (they don’t suck up as much memory as other objects) But ask yourselves, what are you going to do with those location objects after you placed the units? Exactly! Nothing...
.
So the bigger concern is that you are only going to use them once, and probably never again touch them (even though it might feel like that when you call upon that same function again).
This is why you save the return values of those point functions like people in above posts mention so you save the reference to the object and once you have used the object to place whatever you wanted to place. You can safely remove the location so it doesn’t smurf/troll/wander around in your memory and stack up with other locations objects you make throughout your map and not get removed on their turn either.