This is just a quick thought,
in a GUI trigger. Using a global Location/Point variable, it would normally have to be reset/nulled at the end. (obviously before waits/Triggersleeps)
if one was to declare it, and then re-use that same variable, would it have to be nulled twice? or only at the end?
Eg. I have to spawn 2 units at a point set at random.
Point variable is set to random location
First unit is created at variable position
[]
Point variable is set to a different random location
Second unit is created at variable position
Point variable is nulled.
Where the [] is, does the variable need to be nulled again before used? Is memory lost or anything? Or is it acceptable just to null it at the end? (Reducing lines of code and saving time)
This would perhaps help in the case of a loop:
eg.
Loop For 1-100:
{
Set point = Random Point
Create unit at variable location
[null variable?]
}
null location variable
In this case is the "[null variable?]" neccessary? - I'm sure it would benefit if that was nulled only at the end. Note this is the usage of one variable over-written.
Bad idea or good time/memory saver?
in a GUI trigger. Using a global Location/Point variable, it would normally have to be reset/nulled at the end. (obviously before waits/Triggersleeps)
if one was to declare it, and then re-use that same variable, would it have to be nulled twice? or only at the end?
Eg. I have to spawn 2 units at a point set at random.
Point variable is set to random location
First unit is created at variable position
[]
Point variable is set to a different random location
Second unit is created at variable position
Point variable is nulled.
Where the [] is, does the variable need to be nulled again before used? Is memory lost or anything? Or is it acceptable just to null it at the end? (Reducing lines of code and saving time)
This would perhaps help in the case of a loop:
eg.
Loop For 1-100:
{
Set point = Random Point
Create unit at variable location
[null variable?]
}
null location variable
In this case is the "[null variable?]" neccessary? - I'm sure it would benefit if that was nulled only at the end. Note this is the usage of one variable over-written.
Bad idea or good time/memory saver?