Fix for significant memory leak caused by not detaching node state from parent-state when disposing.

This commit is contained in:
Aaron Craelius 2014-11-26 19:17:10 -05:00
parent 8a43020a3e
commit 772b238fc1

View file

@ -102,7 +102,10 @@
;(println "disposing" dom-node)
(let [node-id (get-node-id dom-node)
state (aget element-state-lookup node-id)]
(dispose-node node-id state)))
(dispose-node node-id state)
(when-let [parent-state (.-parent-state state)]
(when-let [child-states (.-child-states parent-state)]
(js-delete child-states node-id)))))
([child-key state]
(when state
(set! (.-disposed state) true)