• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Huge Handle Leaks!!!!!!!Help!!!!!

Status
Not open for further replies.
Level 5
Joined
Mar 6, 2015
Messages
130
hello
I`v Encountered a very horrible thing a trigger which is creating approximately 30k Leaks!:goblin_jawdrop:
  • For each (Integer CGR_LoopInt) from 1 to CGR_IntMax, do (Actions)
    • Loop - Actions
      • Set CGR_loc = (Load (Key (Loc + (String(CGR_LoopInt)))) of (Key (Picked unit)) in CGR_Hash)
      • Custom script: call RemoveLocation(udg_CGR_loc)
Note:there are some other actions inside loop but they don`t make any Leaks according to my analysis this single Load Action Creating all of These Leaks.

I`m Using
  • Leak Finder
    • Events
      • Time - Every 0.09 seconds of game time
    • Conditions
    • Actions
      • Set Debug = (Point(0.00, 0.00))
      • Custom script: call BJDebugMsg(I2S(GetHandleId(udg_Debug)-0x100000))
      • Custom script: call RemoveLocation(udg_Debug)
 
Level 5
Joined
Mar 6, 2015
Messages
130
OK I have Found the problem but how can i fix it?
Look at this test Trigger
  • Test
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Test1
    • Actions
      • For each (Integer A) from 1 to 600, do (Actions)
        • Loop - Actions
          • Set Test_Point = (Random point in (Playable map area))
          • Custom script: call RemoveLocation(udg_Test_Point)
this trigger makes 800 Leaks Why?
 
Level 5
Joined
Mar 6, 2015
Messages
130
Sounds like you use a leak checker. Don't.
hello thanks for reply
I`m using The leak Finder Trigger in the first post which is counting handles
let me explain what i`m doing here i want to create a grid system, the system works very Well in Action although I changed the method of saving points by saving x and y of the point (to make sure the Hashtabe-Save Location doesn`t leak ) but still i Encounter huge count of Handles finally i found the source of bug the Loop creating this bugs even if i Create Point and remove it immediately the handle counter blows up and shows approximately 2000 leaks
is it true? do i have 2000 leaks?how can i fix it?
 
Status
Not open for further replies.
Top