Page 1 of 1

Radio variables still in memory after Gui is Cancelled and Destroyed

Posted: 13 Jan 2017, 04:50
by pneumatic

Code: Select all

Gui, Cancel
Gui, Destroy
After calling the above, the associated variables of any radio buttons in that GUI are still in memory....[/snip]

edit: nevermind, this is a good feature to have.

Re: Radio variables still in memory after Gui is Cancelled and Destroyed

Posted: 13 Jan 2017, 04:53
by just me
Of course the workaround is simple: just set the radio buttons to 0 on GuiClose, ...
It's your GUI, so it's your task. ;)

Re: Radio variables still in memory after Gui is Cancelled and Destroyed

Posted: 13 Jan 2017, 04:55
by pneumatic
I just saw
https://autohotkey.com/board/topic/7053 ... variables/

So in fact it's better this way :)

Re: Radio variables still in memory after Gui is Cancelled and Destroyed

Posted: 13 Jan 2017, 05:00
by pneumatic
Actually, now I remember why I thought it was a bug :)
Gui, Destroy
Removes the window (if it exists) and all its controls, freeing the corresponding memory and system resources. If the script later recreates the window, all of the window's properties such as color and font will start off at their defaults (as though the window never existed). If Gui Destroy is not used, all GUI windows are automatically destroyed when the script exits.