too-many-lists/production-unsafe-deque/layout #1413
Replies: 5 comments
-
这鸡汤十分的珍贵,直接来吧!!! |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
没看懂传统方法和虚拟节点方法在讨论啥 |
Beta Was this translation helpful? Give feedback.
-
不实现 Drop 时, long_list 测试不会栈溢出, 因为 next 和 prev 自成一条循环引用, 会导致内存泄漏. 必须实现 Drop 防止内存泄漏 |
Beta Was this translation helpful? Give feedback.
-
自己增加了从链表尾部插入节点和取出节点的接口: use std::rc::Rc; pub struct List { type Link = Option<Rc<RefCell<Node>>>; struct Node { impl Node { impl List {
} impl Drop for List { #[cfg(test)]
} |
Beta Was this translation helpful? Give feedback.
-
too-many-lists/production-unsafe-deque/layout
https://course.rs/too-many-lists/production-unsafe-deque/layout.html
Beta Was this translation helpful? Give feedback.
All reactions