In the "Things that leak" sticky the answer is sort of implied with:
However, it doesn't explicitly say that this will not cause a leak, but below it, it makes an example which would obviously leak, as it creates a location based on a function, and states that this one would leak.
So it doesn't actually state that referencing a defined point, will not cause a leak. Although it is implied.
So, in no uncertain terms:
Will referencing a point that's defined in a global variable cause a leak?
I'm not talking about setting the variable, which would obviously cause a leak, as a new location has to be generated. I want to use defined points to avoid memory leaks in a map where I am using a lot of static locations which are never changed, so the points would obviously take up memory, but they shouldn't leak memory every time the point is referenced. I just want to ensure, that this is indeed the case.
Unit - Create 1 unit at Somewhere![]()
However, it doesn't explicitly say that this will not cause a leak, but below it, it makes an example which would obviously leak, as it creates a location based on a function, and states that this one would leak.
So it doesn't actually state that referencing a defined point, will not cause a leak. Although it is implied.
So, in no uncertain terms:
Will referencing a point that's defined in a global variable cause a leak?
I'm not talking about setting the variable, which would obviously cause a leak, as a new location has to be generated. I want to use defined points to avoid memory leaks in a map where I am using a lot of static locations which are never changed, so the points would obviously take up memory, but they shouldn't leak memory every time the point is referenced. I just want to ensure, that this is indeed the case.
Last edited: