View Single Post
  #7  
Unread 10-23-2011, 01:41 AM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 343
Quote:
Originally Posted by SanDBoX
on the point of keeping a list of windows, does anyone know how well the garbage collection works in lotro/lua? how many windows would it take to start slowing the client if I record each and every one of them? and how would I tell the client to kill a window other then setting it to not-visible?
Garbage collection usually works fine but if you find the need to force a garbage collection cycle (I found an issue in the Card game that required me to manually force a collection cycle) you can with the collectgarbage("collect") command. As to killing a window, setting it to non-visible does not release the window to be collected, you must set all references to it to nil. So when you instantiate a window with: newWindow=SomeWindow() you would then need to use newWindow=nil to allow the garbage collection to remove the window. It is a good idea to set the window to non-visible first so that the graphics are hidden until the garbage collection gets around to actually removing it but until all references are set to nil the window won't get collected.
Reply With Quote