HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Does ForGroupBJ leak?

01-17-2006, 07:10 PM#1
Jacek
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
Naakaloh
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
Nantuko Husk
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
Starcraftfreak
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
Chuckle_Brother
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
Nantuko Husk
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
Chuckle_Brother
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
Nantuko Husk
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
Jacek
Well... thats the truth, gui suxx
01-18-2006, 07:25 PM#10
mmx2000
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
shadow1500
Quote:
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?
Yes, you will have to destroy every unit group/player group/point u create to prevent leaks.
01-18-2006, 10:03 PM#12
Vexorian
Quote:
Originally Posted by mmx2000
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?
Well that's it, the time one would take learning JASS is the same or less than the time it takes to learn GUI at the end
01-18-2006, 10:23 PM#13
The_AwaKening
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
mmx2000
Quote:
Originally Posted by Vexorian
Well that's it, the time one would take learning JASS is the same or less than the time it takes to learn GUI at the end
Good point. I've taken two years of Comp. Sci. too lol... that's part of the problem. Whenever I learn a new language I always fukk up the syntax of everything -_-
01-18-2006, 10:56 PM#15
Vexorian
GetPlayersAll is a global, and you didn't create a force for that, you assigned it to a variable