Properly dispose of widget model. Delete comm's ref to

the widget model so the GC will collect it when it is
no longer reference elsewhere.
Jonathan Frederic 13 years ago
parent 296d0e0b31
commit 67f364396f

@ -84,6 +84,7 @@ define(["components/underscore/underscore-min",
view.remove();
}
}
delete this.comm.model; // Delete ref so GC will collect widget model.
},
@ -308,6 +309,7 @@ define(["components/underscore/underscore-min",
}
}
that.comm.close();
delete that.comm.model; // Delete ref so GC will collect widget model.
}
});
return view;

Loading…
Cancel
Save