PZ-UI_API
PZ-UI_API copied to clipboard
How to "Destroy" Window?
I simply did:
local lastVisibleUI = UI.isUIVisible UI:close() UI = nil UI = MyCreateNewUI() -- A user defined function that creates a new UI window UI.isUIVisible = lastVisibleUI
But I am not sure whether this approach creates memory leaks.
It certainly creates some overhead since it creates/destroys the window repeatedly, but it is just one window so it is not noticeable I guess.
Please let me know if there is a better way of doing this.