I haven't ever really had much lag from it... really only when over using the copy command
But of course that has nothing to do with leaks... heh...
Avoid Memories leak
Moderator: Cheaters
-
- Legendary Genius
- Posts: 1311
- Joined: August 8th, 2007, 8:10 am
- Title: Legendary Genius²
- Location: St. George Utah
Re: Avoid Memories leak
Computer Specs:
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Avoid Memories leak
It could easily be leaking if uses GetUnitLoc or something similar.JJ2197 wrote:I haven't ever really had much lag from it... really only when over using the copy command
But of course that has nothing to do with leaks... heh...
-
- Legendary Genius
- Posts: 1311
- Joined: August 8th, 2007, 8:10 am
- Title: Legendary Genius²
- Location: St. George Utah
Re: Avoid Memories leak
Well I don't know JASS very well, but I think it wouldn't leak due to it destroys the referance
point of the unit with GroupRemoveUnit... though I could easily be wrong... =/
point of the unit with GroupRemoveUnit... though I could easily be wrong... =/
Computer Specs:
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate
-
- Forum Staff
- Posts: 926
- Joined: June 3rd, 2007, 8:03 pm
Re: Avoid Memories leak
You also need to call removelocation on the reference before you null the ref or your stuck with that loc being ter 4eva. 

-
- Legendary Genius
- Posts: 1311
- Joined: August 8th, 2007, 8:10 am
- Title: Legendary Genius²
- Location: St. George Utah
Re: Avoid Memories leak
So just add like call RemoveLocation(GetUnitLoc(u2u)) right after the endloop...?
Computer Specs:
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate
-
- Forum Staff
- Posts: 926
- Joined: June 3rd, 2007, 8:03 pm
Re: Avoid Memories leak
no heres a sample of my cheapack whenever i feel like updating it that is mayb ill do it tonite, neway.
Code: Select all
function xWY takes nothing returns nothing
local location j=GetUnitLoc(GetTriggerUnit())
call CreateUnitAtLoc(GetTriggerPlayer(),GetTrainedUnitType(),j,270)
call RemoveLocation(j)
set j=null
endfunction
-
- Legendary Genius
- Posts: 1311
- Joined: August 8th, 2007, 8:10 am
- Title: Legendary Genius²
- Location: St. George Utah
Re: Avoid Memories leak
Well anyways, I don't seem to notice lag unless I look at the mass of units...
So I guess even if this does leak, it must not be much
So I guess even if this does leak, it must not be much

Computer Specs:
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate
-
- Forum Staff
- Posts: 926
- Joined: June 3rd, 2007, 8:03 pm
Re: Avoid Memories leak
Nope it leaks one location every time a unit is copied, so only if you create many many units with copy will this even start to be noticed.
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Avoid Memories leak
Any native that returns a location actually creates a location (Instead of providing reference to one)JJ2197 wrote:So just add like call RemoveLocation(GetUnitLoc(u2u)) right after the endloop...?
Therefore, "GetUnitLoc(u2u)" creates a location when it's called (So RemoveLocation(GetUnitLoc(u2u)) is just removing a location it just created...accomplishing nothing).
You can prove this by running a test similar to this:
function test takes nothing returns nothing
local unit u=GetTriggerUnit()
local location a=GetUnitLoc(u)
local location b=GetUnitLoc(u)
call RemoveLocation(a)
call CreateUnitAtLoc(Player(0),'hpea',b,0.)
call RemoveLocation(b)
set a=null
set b=null
endfunction
-
- Some Honorary Title
- Posts: 1713
- Joined: June 8th, 2007, 5:08 am
- Title: Angry Bird
Re: Avoid Memories leak
I said "I didn't use your codes" That's it. Btw, that's Aero's codes, and your idea. Please don't mix them up ok?weirdone2 wrote:Pfft You're still using the concept.Weirdone, i really didn't use your codes. Netheir do I used JJ codes.
I hoped I could use them but those codes leak. So I used Aero's suggestion. And add somemore thing I needed.
Your -tele or Jj's -tele was using call location xy right? Since I don't wanna to use the removeLocation thingie I have to do it another way.I don't really care much if you use my code as long as you don't try to pawn it off as your own idea/code. It's just something I mentioned since I saw you post it.
Also as a note I don't know about jj's as I've never used it but my pack doesn't lag unless you do something dumb in it.
I give credits for using codes, not ideas. Since I can't really know where the source of all ideas.
Btw, this idea was already on Sg-Guys pack. By using the already existed command, changing it so something else. (it uses STOP), and the wtf blink idea was already on Xantan's pack for a long time.
So let's say thank you to all of you. Thanks Xantan, Sg guy and your idea.
I was a fan of Xantan's and Sg-Guys' pack since i play a lot of dota. You are right it's your idea.
But not codes. Codes belongs to Aero. I believe I have the right to call the command made by me, because that command(in the latest fai's pack) ,has only used a native function suggested by Aero. Inside it there is a player code detector, a string location detector, a string dectector for a the disbale command, and another string command for "-closing all functions".
For all those who didn't know anythng about JASS, you could just test it by using the tp. on dota made by me. It can be teleported into fog of war.
I haven't even once play Weirdone's pack, since it uses a diferent native, I can see that it will not able to blink into the fog of war. It's just 2 different blinks.
hmmm, it's just as simpleAero wrote:No idea what you mean.initiald wrote:p/s the server split was caused by some invalid return. I just knew this "Blizzard bug" recently.
Whenever a function takes something from boolean, if the boolean is "invalid", BLizzard would not return automatically itself, the command will stay there for as long time as possible, till all player dc'ed. Since JASS is still not official codes for Blizzard, these kind of bug will not be fixed in the future patch.
w/e
Function Anything takes nothing return boolean
if abc==cde then
return true
endif
endfunction
thiese kind of function is causing the server split, or everyone dc'ed.
it could be fixed by just adding one more line.
Function Anything takes nothing return boolean
if abc==cde then
return true
endif
retunr false
endfunction
So it would have something to return in w/e situation. I saw some of this invalid returns on other packs as well. If the particular command was spammed too much, it will cause players dropping one by one, or worse, all dc'ed.
The only bad thing is JASScraft never tells you if you have made this kind of misakes. So the way I tested it was to put CallDisplayText on the end of all cheat commands, so I can test which command doens't return.
Last edited by initialD on April 30th, 2008, 4:20 am, edited 1 time in total.