| 01-17-2006, 07:10 PM | #1 |
Does it leak? I was pretty sure about that, until I read on some topic (not on wc3c) that when you set some bj_ constant, group is removed. so I am ![]() |
| 01-17-2006, 07:12 PM | #2 |
I'm not sure about ForGroupBJ(), but often the group parameter used will leak. Like if you got the group for all the units in the map and didn't fix the leak. |
| 01-17-2006, 07:17 PM | #3 |
no! internally that function doesnt leak. but if you dont destroy the group you pass ass parameter it will leak. you can set bj_wantDestroyGroup==true before that function call and forgroupbj will destroy it for you. |
| 01-17-2006, 11:22 PM | #4 |
Yes, but there is no point in doing so. Just use ForGroup and destroy it manually and you are on the native side ![]() |
| 01-18-2006, 03:14 AM | #5 |
Seriously, all set bj_WantDestroyGroup does is makes ForGroupBJ have an extra piece to the end 'call DestroyGroup(whichGroup)', check the Blizzard.j file and you will see the full magnitude of how retarded the BJ functions really are. |
| 01-18-2006, 12:12 PM | #6 |
The guy asked for forgroupbj and I pointed him that stuff. now I dont see why would be retarded having an if to that function. if I dont want my group destroyed in GUI what I do,or if I am a GUI user , where gui creates groups all the time it will leak like a hell. so the if is not retarded. |
| 01-18-2006, 12:47 PM | #7 |
You won't have problems if you properly set up groups, example: set Funk = Unit in (Playable map Area) Pick every unit in (Funk) Do Some Stuff Custom Script: call DestroyGroup(udg_Funk) |
| 01-18-2006, 12:54 PM | #8 |
Yes,I know that but the GUI guys dont. And if you are going to do the stuff you say , you could have known to use forgroup.so it is most use to the gui |
| 01-18-2006, 01:31 PM | #9 |
Well... thats the truth, gui suxx |
| 01-18-2006, 07:25 PM | #10 |
Wait wait - I'm a GUI user cause I'm just getting started into map making, and don't quite have the time to sit and learn JASS right now. I use Unit Groups all the time but I've never destroyed them... are you saying everytime I do this I'm creating memory leaks? IE, in 1 map I made for me and my friends I implementing a Mass attack command that selects all units and orders them to attack somewhere... this trigger gets run a ton, and I never used Custom Script: call DestroyGroup(udg_groupthingymobob) and the map seemed to bog like hell after a while. Could that solve the problem? |
| 01-18-2006, 08:36 PM | #11 | |
Quote:
|
| 01-18-2006, 10:03 PM | #12 | |
Quote:
|
| 01-18-2006, 10:23 PM | #13 |
Ah so this brings me to a question about player groups "force". I always use a local force variable to select a player group except in the case of game displays. I tried doing it once but for some reason it would screw up the rest of the game after I created a force for GetPlayersAll() and then destroyed it. |
| 01-18-2006, 10:42 PM | #14 | |
Quote:
|
| 01-18-2006, 10:56 PM | #15 |
GetPlayersAll is a global, and you didn't create a force for that, you assigned it to a variable |
