Skip to content

Commit

Permalink
destroy context cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
briancavalier committed Dec 6, 2011
1 parent 81cffaa commit 4b575a3
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions wire.js
Expand Up @@ -448,10 +448,15 @@ define(['require', 'when', 'wire/base'], function(require, when, basePlugin) {

// *After* listeners are processed,
whenAll(promises, function () {
function deleteAll(container) {
for(var p in container) delete container[p];
}

deleteAll(local);
deleteAll(objects);
deleteAll(scope);

var p, i;
for (p in local) delete local[p];
for (p in objects) delete objects[p];
for (p in scope) delete scope[p];

for (i = 0; (p = proxied[i++]);) {
p.destroy();
Expand Down

0 comments on commit 4b575a3

Please sign in to comment.