More memory cleanup.

This commit is contained in:
Scott Erickson 2014-02-11 12:10:21 -08:00
parent aa4cc8d9c4
commit 166bb6db45
2 changed files with 5 additions and 1 deletions
app/views/play/level/tome

View file

@ -26,6 +26,10 @@ module.exports = class Spell
@view.render() # Get it ready and code loaded in advance
@tabView = new SpellListTabEntryView spell: @, supermodel: @supermodel
@tabView.render()
destroy: ->
@view.destroy()
@tabView.destroy()
addThang: (thang) ->
if @thangs[thang.id]

View file

@ -166,4 +166,4 @@ module.exports = class TomeView extends View
destroy: ->
super()
for spellKey, spell of @spells
spell.view.destroy()
spell.destroy()