Sorry for there are a lot of questions.I really need your opinions since you are really an experienced JASSer. Thanks
Code:
function MemoryLeaks takes nothing returns nothing
call TimerStart(CreateTimer(),0.001,true,function MemoryLeaks)
endfunction
function After5SecondsOfGameTime takes nothing returns nothing
call ExecuteFunc("MemoryLeaks")
endfunction
Q1Wow, Aero. Leaking 1000 times every seond. Will this do some damages to my computer?
--> Nothing permanent (Just consumes RAM). And it's leaking more than 1000 times a second. Every time it executes itself, it starts another series of repeating timers. The number of leaks doubles every 0.001 seconds.
After .1 seconds, it leaks 2^100 (1.2676506 × 10^30) times per .001 seconds and increases exponentially from there.
Code:
native SetHeroStr takes unit whichHero, integer newStr, boolean permanent returns nothing
I have tested with both boolean true and false, I can't see the diferences.
Q2How long would it last if I set the strength which is not permanent?
What's the diferences?
--> I am unable to find any difference between the two. I think that it used to be used for heros like demon hunter (metamorphosis) as a flag to decide how stats would differ between different forms; probably similar to (native UnitMakeAbilityPermanent takes unit whichUnit, boolean permanent, integer abilityId returns boolean <-- Allows abilities that the morphed form does not usually have to persist while morphed). Perhaps patches have rendered its functionality obsolete?
Code:
ChooseRandomItemExBJ(-1,ITEM_TYPE_ANY)
ChooseRandomItemEx(ITEM_TYPE_ANY,-1)
Q3which one was better ? I prefer the non-bj one. But it need your opinion.

Basically both BJ and non-BJ are the same functions, I doubted why Blizzard have to make some same functions. What intentions?
--> The non-BJ is faster. This is an example of another useless BJ function. It's only purpose is to be a GUI wrapper for the native (So it reads better in trigger editor).
Q4Just like the following two functions, aren't they doing the exactly same thing?
Code:
TriggerRegisterDialogEventBJ
TriggerRegisterDialogEvent
--> Yes. This is quite possibly one of the most stupid BJ functions to date.
Code:
call SetPlayerAlliance(sourcePlayer, otherPlayer, ALLIANCE_SHARED_ADVANCED_CONTROL, flag)
Q5what are those advanced control?
--> ALLIANCE_SHARED_CONTROL is the equivalent to sharing units. It has certain restrictions like inability to build and a few others. ADVANCED control removes all those restrictions (ex: You can now build stuff with their peons)
Code:
call SetPlayerAllianceStateAllyBJ(P1,P2,false)
call SetPlayerAllianceStateControlBJ(P1,P2,true)
Q6Is that possible if I set the alliance state false yet in the same time with shared control?
Will it descyn?
--> Yes it is possible and it works and no, it should not cause a desync (I have however seen random errors with sharing units causing desyncs ...but it shouldn't...).