optimize widget destruction

This commit is contained in:
Eduardo Bart
2012-04-09 17:52:39 -03:00
parent 353aa5215e
commit 5425d344ba
6 changed files with 57 additions and 21 deletions

View File

@@ -59,7 +59,7 @@ function NPCTrade.init()
end
function NPCTrade.terminate()
radioTabs:destroy()
--radioTabs:destroy()
radioTabs = nil
npcWindow:destroy()
npcWindow = nil
@@ -229,7 +229,10 @@ function NPCTrade.createItemsOnPanel()
offerSelected = nil
itemsPanel:destroyChildren()
if radioItems then
radioItems:destroy()
end
radioItems = RadioGroup.create()
for i, v in pairs(cacheItems) do