mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
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.
This commit is contained in:
parent
296d0e0b31
commit
67f364396f
@ -84,6 +84,7 @@ define(["components/underscore/underscore-min",
|
|||||||
view.remove();
|
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();
|
that.comm.close();
|
||||||
|
delete that.comm.model; // Delete ref so GC will collect widget model.
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return view;
|
return view;
|
||||||
|
Loading…
Reference in New Issue
Block a user