Dialogs and Buttons Leaks?

Leo

New Member
Reaction score
14
I just started working on a new map that uses alot of dialogs, I've read on a bunch of a posts that dialogs leak (but its not normally an issue since people don't use many). Since I'm using alot, I figure I should probably clean these leaks. What are the lines of code for destroying them?
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
u can destroy them yet it doesn't make this thing a leak

a leak is only when every time u do the action it would create new dialog or dialog button and since they require variables to use them anyway they do not leak....
 

Leo

New Member
Reaction score
14
Just because something is set to a variable doesn't mean it doesn't leak (for example unit group - if you set a unit group to a variable, and then set a new group to the variable to the variable, without destroying the first unit group, you will have a leak)

In my map I will be setting different buttons to the same variables at different points in the game. Therefore, I assume I need to destroy the old values for the buttons and dialog variables.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
i dunno about that but im pretty sure it won't leak
since that dialog no longer exist on the map itself or in the data and about the button i think that clearing them would be enough
even though there might be chance it does leak try ask some pro here
 

Leo

New Member
Reaction score
14
Well duh, why would I destroy them before I use them... :p

But what is the destroy button code line?
 

Leo

New Member
Reaction score
14
Yea Rheias already said that, but doesnt that destroy just the dialog, what about the buttons, since they are separate variable type?
 

Terrabull

Veteran Member (Done that)
Reaction score
38
if I'm not mistaken, dialog buttons are integers and strings together forming a happy union. That would make it a non-leaking variable type.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
"button" extends "handle". As such, it has the potential for leaks.
There is no function I know of that would destroy a dialog button...

Either way, never seen any reports on how badly they leak or so.
It won't crash your map... :p
 

Leo

New Member
Reaction score
14
"button" extends "handle". As such, it has the potential for leaks.
There is no function I know of that would destroy a dialog button...

Either way, never seen any reports on how badly they leak or so.
It won't crash your map... :p

Perhaps I will make "Dialog Wars: See who can click the most buttons" in an attempt to cause a dialog leak induced crash heh

Anyways, thanks for all the comments, they were quite useful.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top