บทที่ 14: Smart Pointers
Smart pointers คือ structs ที่ทำตัวเหมือน pointers แต่มีความสามารถเพิ่มเติม
สิ่งที่จะได้เรียนรู้
| Type | คำอธิบาย |
|---|---|
| Box<T> | Heap allocation |
| Rc<T> | Reference counting |
| RefCell<T> | Interior mutability |
| Weak<T> | ป้องกัน cycles |
👉 Box<T>
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
Smart pointers คือ structs ที่ทำตัวเหมือน pointers แต่มีความสามารถเพิ่มเติม
| Type | คำอธิบาย |
|---|---|
| Box<T> | Heap allocation |
| Rc<T> | Reference counting |
| RefCell<T> | Interior mutability |
| Weak<T> | ป้องกัน cycles |
👉 Box<T>