| 02-28-2009, 12:19 AM | #1 |
Okay, so referencing a location such as "Center of Region" leaks. The typical solution to this is: Trigger: Actions
![]() Set Temp_Loc = (Center of Pasture <gen>)
![]() Unit - Order (Entering unit) to Move To Temp_Loc
![]() Custom script: call RemoveLocation(udg_Temp_Loc) |
| 02-28-2009, 12:33 AM | #2 |
Learn JASS so you only have to use Loc's for terrain Z. I can't say more atm, but I'll edit the post later. |
| 02-28-2009, 12:38 AM | #3 | |
Quote:
You could perhaps leak that one location ...but that doesnt matter at all ..its ..dunno ...4bytes ? |
| 02-28-2009, 12:45 AM | #4 |
Wouldn't it leak every time that trigger fires? |
| 02-28-2009, 12:46 AM | #5 |
I'm not sure it's "excessive". That seems like proper protocol for Localizing the global variable, so... What's the beef? |
| 02-28-2009, 12:51 AM | #6 |
Assigning a variable and removing it 400 times instantaneously is what seems excessive. |
| 02-28-2009, 12:56 AM | #7 | |
Quote:
hmm ..wont do any harm ...only thing could be thread crash due to op limit hit... but i think that may take more than 400 times that shit ..to reach the limit |
| 02-28-2009, 12:58 AM | #8 |
Well, it all depends on how "instantaneously" it really is. AFAIK, a trigger runs through a whole time, with no interruptions. So even if it does it 400 times consecutively, that's cool; it's what it's meant to do. Also, what in the world is doing that to a location so many times?? |
| 02-28-2009, 01:14 AM | #9 |
If you can still access and are still using the location, it is not actually leaked. Cached would be a better word. |
| 02-28-2009, 01:16 AM | #10 |
I'm curious to know what exactly that's for as well o.o |
| 02-28-2009, 01:49 AM | #11 | |
Quote:
Let me assure you that the unit order is by far the most expensive call there. The assignment and cleanup are jokes in comparison. |
