File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 7575 fn drop ( & mut self ) {
7676 // This is necessary to prevent stack overflows deallocating long chains of the mutually
7777 // recursive `Frame` and `FrameData` types. This iteratively traverses as much of the
78- // chain as needs to be deallocated, and repeatedly "pops" the head off the list.
78+ // chain as needs to be deallocated, and repeatedly "pops" the head off the list. This
79+ // solves the problem, as when the time comes to actually deallocate the `FrameData`,
80+ // the `next` field will contain a `Frame::End`, or an `Arc` with additional references,
81+ // so the depth of recursive drops will be bounded.
7982 loop {
8083 if let Ok ( arc_next) = self . next . get_mut ( ) {
8184 if let Some ( next_ref) = Arc :: get_mut ( arc_next) {
You can’t perform that action at this time.
0 commit comments