PZ-UI_API icon indicating copy to clipboard operation
PZ-UI_API copied to clipboard

How to "Destroy" Window?

Open TsiamDev opened this issue 1 year ago • 1 comments

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.

TsiamDev avatar Mar 14 '24 19:03 TsiamDev