You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
I'm not sure for this, it's been a while since I played with PZ code.
I think you will need to check the UI manager of PZ, there is a function to destroy an UI but I don't remember it. This mod is not really to create and delete a lot of UI. Just to get some simple stuff for small mods or rapid testing.
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.
The text was updated successfully, but these errors were encountered: