| 08-05-2007, 03:52 AM | #2 |
In Move, the Unit Group... In Spartan Spearman Create, the uncleaned point variables! And I think those units will leak points... I haven't used XY coordinates in ages... |
| 08-05-2007, 04:05 AM | #3 |
Random point in region. Not destroying the group before setting a new one Offset Location Not destroying the points in the first trigger If your hero is in the Units[] group, it will create a loop, that would continually trigger the trigger. Make sure he isn't included, or add a check if the picked unit does not equal the triggering unit. |
| 08-05-2007, 04:51 AM | #4 |
dollars for doughnuts its the continuous loop that is causing the problem ;P |
| 08-05-2007, 05:25 AM | #5 |
Add the units as well to the list -Av3n |
| 08-05-2007, 06:29 AM | #6 |
Units are not leaks, as long as they can be removed in some way. The reason a point leaks is cause once you lose the pointer, it's impossible to generate a new one. With a unit, you can pick all units in the map and get a new pointer to the unit. |
| 08-05-2007, 06:38 AM | #7 |
hm units do leak.... Its not the unit itself but its the variable... variables take space, and if u dont set them to null they will take big space. So to make sure nothing leaks... remove/destroy locations, then set these variables to null: -location (point) -unit -player -force these are the common variable types that is often use and that leaks. Remeber GUI leaks alot because off all these GetRandomPointInRegion,Player(1,2,3,4...ect),GetPointWithOffset,AllPlayers()... all these things that you think "give something back" will leak. so special effects will also leak yes :) |
| 08-05-2007, 06:47 AM | #8 |
GUI is a one big leak, and its good, you will never meet null handles or other thread crush staff. |
| 08-05-2007, 07:01 AM | #9 |
Screw that... you can call for custom script! Meh, it's cheating JASS into GUI. I was told something that doesn't exactly crush-- what the hell does crush mean? Desynchronising a player? |
| 08-05-2007, 08:12 AM | #10 | ||
Quote:
Keep in mind the poster is using GUI which only contains global variables (that he could modify). Globals do not need to be set to null since they will be used again later. Quote:
Using a player as an argument does not leak a player, it calls Player(x) directly. And for when you use Force - Player 1 Red, it returns a bj global, which SHOULD NOT be nulled, or it will never work again. AllPlayers() does not leak a force either since it returnsbj_FORCE_ALL_PLAYERS which SHOULD NOT be nukked, or it will be "broken" as well. I don't think the problem is so much the leaking, but the misuse of leak clean-up and not understanding what a leak is. If you are not 100% sure something leaks, don't clean it up. You could end up screwing your entire map up because a force leaked once in a text message. |
| 08-05-2007, 01:38 PM | #11 |
could someone help me fix it up? botanic was helping me make a "legion" system, but I'm a newb at triggering and I dont really know how to. and for those of you who dont know, it's a unique 300 map im trying to make with botanics' help. but botanic isnt at his computer right now, so... anyone willing to help? I have aim, and if you do too and if you decide to help me, it will probably run smoother. |
| 08-05-2007, 09:35 PM | #12 |
i understand leaks and such the problem must lie in the creation of an infanate number of points (at least the problem i was trying to fix there) PS ill fix it tonight Mr.Wuggles |
| 08-06-2007, 01:18 AM | #13 | |
Quote:
PLayer() do leak into a local var AllPlayers do leak into a local var Also remember even if a function return a bj variable, it still returns a copy value from that variable, not the referanse... So it will not stop working if u null the returned value ;) But ofc Player and Forces dont need to be nulled for global vars, but still need to be catched with a globalvariable so that the returned values wont leak. |
