Serious memory leaks
Page 1 of 1
Serious memory leaks
Hey!
It looks like this map got some serious memory leak problems. At Level 31 WC3 had 1.3 GB Memory usage.
Switch to jass and JUST use functions with X Y coordinates. Also Use GroupUtils ( ) for every group stuff you need.
X+Y is just working with reals => leaks nothing at all. GroupUtils recicles Groups and will reduce the groupleaks to a minimum.
That will hopefully make level beyond 25 playable.
Greets, iNfamous.
It looks like this map got some serious memory leak problems. At Level 31 WC3 had 1.3 GB Memory usage.
Switch to jass and JUST use functions with X Y coordinates. Also Use GroupUtils ( ) for every group stuff you need.
X+Y is just working with reals => leaks nothing at all. GroupUtils recicles Groups and will reduce the groupleaks to a minimum.
That will hopefully make level beyond 25 playable.
Greets, iNfamous.
iNfamous- Guest
Re: Serious memory leaks
Hmm i had a link in my Post, but something removed it.
wc3c.net/ showthread.php?t=104464 (remove the space between the /
SetUnitPositionLoc (takes a location , this leaks, even if you remove the location afterwards)
SetUnitPosition( takes x y coordinates, no leak at all )
SetUnitX and
SetUnitY ( takes x and y cordinates, no leak at all AND is even faster then set position, because it has no savety things like "is location pathable and stuff" )
wc3c.net/ showthread.php?t=104464 (remove the space between the /
SetUnitPositionLoc (takes a location , this leaks, even if you remove the location afterwards)
SetUnitPosition( takes x y coordinates, no leak at all )
SetUnitX and
SetUnitY ( takes x and y cordinates, no leak at all AND is even faster then set position, because it has no savety things like "is location pathable and stuff" )
iNfamous- Guest
Re: Serious memory leaks
Also you perhaps have triggers like that:
Unit - Order (Entering unit) to move to (Center of " Just a rect ")
That also leaks, because center of rect leaks a location.
So you switch to coordinates:
call IssuePointOrder( GetEnteringUnit(), "move", GetRectCenterX("just a rect"),GetRectCenterY("just a rect") )
This wont leak at all.
Unit - Order (Entering unit) to move to (Center of " Just a rect ")
That also leaks, because center of rect leaks a location.
So you switch to coordinates:
call IssuePointOrder( GetEnteringUnit(), "move", GetRectCenterX("just a rect"),GetRectCenterY("just a rect") )
This wont leak at all.
iNfamous- Guest
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|