Handling Reference Cycles (in Rust)
Автор: Thomas 🏕
Загружено: 2022-05-05
Просмотров: 1317
Описание:
In this video we talk about using the Weak Smart Pointer type in order to handle reference cycles in Rust so we can avoid memory leaks. The Weak Smart pointer will allow us to add things like the parent node onto the binary search tree, as well as introduce us to the concept of threaded binary trees. We learn about how to properly downgrade and upgrade a weak reference in order to work with the underlying data and we use the debugger to inspect when the weak count increments on a reference counter.
Part 1: Insertion Algorithm • Binary Tree Insertion Algorithm (in Rust)
Part 2: Level Order Traversal • Binary Tree Level Traversal Algorithm (in ...
Part 3: Inorder Traversal • Binary Tree Inorder Traversal Algorithm (i...
Part 4: Tree Traversal Iterators • Tree Traversals with Iterators and Lifetim...
Part 5: Tree Traversals with Rc • Tree Traversals with Reference Counting an...
Part 6: Debugging Reference Counters • Debugging References Counters in Rust (in ...
Part 7: Handling Reference Cycles • Handling Reference Cycles (in Rust)
↠ References:
Threaded Binary Trees: https://en.wikipedia.org/wiki/Threade...
Rc::downgrade: https://doc.rust-lang.org/nightly/all...
alloc::rc::Weak: https://doc.rust-lang.org/nightly/all...
Reference Cycles: https://doc.rust-lang.org/book/ch15-0...
Interior Mutability: https://doc.rust-lang.org/nightly/std...
Reference Counters: https://doc.rust-lang.org/nightly/src...
std::cell: https://doc.rust-lang.org/src/core/ce...
Borrow Trait: https://doc.rust-lang.org/std/borrow/...
Pointers: https://manishearth.github.io/blog/20...
↠ Dotfiles: https://github.com/nyxtom/dotfiles
↠ Twitter: @nyxtom / nyxtom
↠ Channel: / nyxtom
Cheers! 🍻
🦀 #rust #rustlang #rustprogramming #exercises #programming
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: