More memory cleanup.
This commit is contained in:
parent
aa4cc8d9c4
commit
166bb6db45
2 changed files with 5 additions and 1 deletions
app/views/play/level/tome
|
@ -27,6 +27,10 @@ module.exports = class Spell
|
||||||
@tabView = new SpellListTabEntryView spell: @, supermodel: @supermodel
|
@tabView = new SpellListTabEntryView spell: @, supermodel: @supermodel
|
||||||
@tabView.render()
|
@tabView.render()
|
||||||
|
|
||||||
|
destroy: ->
|
||||||
|
@view.destroy()
|
||||||
|
@tabView.destroy()
|
||||||
|
|
||||||
addThang: (thang) ->
|
addThang: (thang) ->
|
||||||
if @thangs[thang.id]
|
if @thangs[thang.id]
|
||||||
@thangs[thang.id].thang = thang
|
@thangs[thang.id].thang = thang
|
||||||
|
|
|
@ -166,4 +166,4 @@ module.exports = class TomeView extends View
|
||||||
destroy: ->
|
destroy: ->
|
||||||
super()
|
super()
|
||||||
for spellKey, spell of @spells
|
for spellKey, spell of @spells
|
||||||
spell.view.destroy()
|
spell.destroy()
|
||||||
|
|
Reference in a new issue