| 12-05-2008, 12:27 PM | #2 |
It's not the region that's leaking, its the location. "Center of" |
| 12-05-2008, 12:37 PM | #3 | |
Quote:
Okay, I have looked at a tutorial to stop leaks, and it didn't mention that the 'Center of' was a problem. So, how can i avoid doing that? Or at least is there another tut that does show me other ways? actually would: Trigger: Set Region = (Center of Region 022 <gen>) |
| 12-05-2008, 01:18 PM | #4 |
Cleaning up a location is the same no matter how it was created, whether it's "center of region" or "position of unit" or whatever, it doesn't matter, it's still a location. |
| 12-05-2008, 06:53 PM | #5 |
Check out a program called LeakCheck v3, it won't catch every little leak, but it's useful for starting on that stuff, it will even give you suggestions on how to correct them. |
| 12-05-2008, 08:46 PM | #6 |
Thanks for the suggestion, but the program wont even run. Ok, "Center of region <gen>" is a leak. I made all of them into variables. Though, seeing as these variables are in CONSTANT use I don't see why it would be more prudent to destroy them. People here seem more interested in pointing out an issue rather then an idea of how to fix it. I have looked at tutorials, and they all ask for a custom script that they don't provide or don't explain. |
| 12-05-2008, 10:10 PM | #7 | ||
Quote:
Quote:
|
| 12-06-2008, 10:05 AM | #8 | ||
Quote:
This is actually helpful! Would something like: Trigger: Set DuelHeroLoc[0] = (Point(0.00, 0.00))Quote:
I can be extremely slow at times, and I got irritated. My apologies! |
| 12-06-2008, 12:56 PM | #9 |
No, because Point(0,0) creates another new location. You need to use 2 custom script actions: call RemoveLocation(udg_DuelHeroLoc[0]) set udg_DuelHeroLoc[0] = null Reccomend moving to Jass which makes this kind of thing much quicker to implement. |
| 12-06-2008, 02:32 PM | #10 |
Isn't there a variable that stores the last created location? So (if there is) you need only one custom script: call RemoveLocation(said variable) Otherwise, you can create a global for such uses, say Temp_Location. But then again, you will need to set the variable to the location you use all the time. Follow marshall's advice: Move to JASS. |
| 12-06-2008, 03:12 PM | #11 |
You don't need to set globals to null unless you are never going to use them again. |
| 12-06-2008, 03:25 PM | #12 |
...or if you later compare them to null. |
| 12-07-2008, 02:23 AM | #14 |
You shouldn't destroy triggers. So no. Turning it off is fine. |
