Leak test

--Thanatos--

New Member
Reaction score
33

--Thanatos--

New Member
Reaction score
33
Okay I think I got the answer.

Units don't leak (at least we cannot do any to remove the leak, I've read that somewhere).
But still +rep for Squll2 for that... :D

Then another question:
Is it Efficient enough?
 
Reaction score
333
Use DisableTrigger() and TriggerRemoveAction() before destroying.

Edit: Unfortunately, you can only get a triggeraction when you first register a trigger, so it's best to not use actions entirely and instead put your "actions" in the trigger condition (put return false at the end). This is according to Vexorian.

i believe.. but im only a begineer that

Code:
GetTriggerUnit()

will leak.

Not a "leak" you would want to get rid of though.
 

--Thanatos--

New Member
Reaction score
33
Please destroy triggers.

> Use DisableTrigger() and TriggerRemoveAction() before destroying.

DisableTrigger() is unnecessary (heard from SFilip, if I'm not mistaken).

TriggerRemoveAction? I think TriggerClearActions will do the job?

> Edit: Unfortunately, you can only get a triggeraction when you first register a trigger, so it's best to not use actions entirely and instead put your "actions" in the trigger condition (put return false at the end). This is according to Vexorian.

Oh yeah. I remember that there's the trick.

BTW, this is just a test, so don't care about handle stacks. -.-
 
Reaction score
333
Please destroy triggers.

> Use DisableTrigger() and TriggerRemoveAction() before destroying.

DisableTrigger() is unnecessary (heard from SFilip, if I'm not mistaken).

TriggerRemoveAction? I think TriggerClearActions will do the job?

> Edit: Unfortunately, you can only get a triggeraction when you first register a trigger, so it's best to not use actions entirely and instead put your "actions" in the trigger condition (put return false at the end). This is according to Vexorian.

Oh yeah. I remember that there's the trick.

BTW, this is just a test, so don't care about handle stacks. -.-

If there is a TriggerClearActions then it will probably work just as well as TriggerRemoveAction.
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
No leaks here.

You should know that when destroying trigger (although it appears that it shouldn't be done) you need to disable the trigger before destroying it.
 

Tom Jones

N/A
Reaction score
437
As someone mentioned, you'll have to remove the triggeraction from the trigger before destroying it to avoid leaks. DestroyTrigger() doesn't clean triggeractions from a trigger.
 

emjlr3

Change can be a good thing
Reaction score
395
add a condition as opposed to a triggeraction, and use that in its place. Then destroying the trigger is all that is needed.

As far as efficieny goes, structs would still blow this away
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
> Source on this?

I'm unable to find the thread again, however I saw somewhere the removing triggers without disabling them is like removing timers without pausing them, what appears to cause few problems.

Maybe need wasn't the right word, but it certainly won't do harm!

> As someone mentioned, you'll have to remove the triggeraction from the trigger before destroying it to avoid leaks. DestroyTrigger() doesn't clean triggeractions from a trigger.

Or use condition as an action.
 

Dimaspy

New Member
Reaction score
19
Fact about leaks. Nobody likes them, they are in the way, they are irritating, some people has wrecked their computer because of them, and if you don't like the leaks here, never try out Worldcraft making counter-strike maps. :banghead:

( Totally out of topic!! :p )
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
i believe.. but im only a begineer that

Code:
GetTriggerUnit()

will leak.

Units don't leak. Only local units leak, so they need to be set to null. Mapmakers just use variables for GetTriggerUnit() if it is being called a lot of times, so it is easier for them to write some variable name such as "caster" than "GetTriggerUnit()". It is just a time and amount of work efficiency, both will do the same and won't leak. (Except local units because they need to be nulled) :D
 
Reaction score
456
>u need to pause timer before destroying\removing it?
You don't need to, it destroys anyways, but you really should.. I don't remember why >_>

It's also good not to destroy timer you use in spell, you should use same timer for all instances if you are able to.
 

--Thanatos--

New Member
Reaction score
33
I cannot use structs. :( (I don't have NewGen)

> You don't need to, it destroys anyways, but you really should.. I don't remember why >_>
Infinite run bug maybe?

> It's also good not to destroy timer you use in spell, you should use same timer for all instances if you are able to.
Freaking hard w/o globals. -.-

> You should know that when destroying trigger (although it appears that it shouldn't be done) you need to disable the trigger before destroying it.
I don't think so. I remember a mod told me. (forgotten, SFilip if I'm not mistaken)
 

SFilip

Gone but not forgotten
Reaction score
634
> at least we cannot do any to remove the leak, I've read that somewhere
Not true.
A leak only occurs when you create something and don't destroy. Units get destroyed about 90 seconds after death.
GetTriggerUnit does not create anything...and, well, why would someone want to create a unit every 0.1 seconds? Unless it's invisible (dummy) there should be nothing to worry about.

> could u elaborate this one?
Supposedly there is a cached "list" of all handles.
Now recently we figured that I2H based systems tend to corrupt it - warcraft can't understand when a handle simply appears out of nowhere.
When this happens handles you create afterwards might get the same id as some existing...very bad thing really.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top