2 内存管理

内存管理 — Comprehensive Rust

译文 · 基于 Comprehensive Rust

原文链接: https://google.github.io/comprehensive-rust/memory-management.html

2 内存管理

本小节约需 1 小时。内容包括:

内容时长
程序内存回顾5 分钟
内存管理方式10 分钟
所有权5 分钟
移动语义5 分钟
Clone2 分钟
Copy 类型5 分钟
Drop10 分钟
练习:构建器类型20 分钟

2.1 程序内存回顾

01-程序内存回顾 — Comprehensive Rust

2.2 内存管理方式

02-内存管理方式 — Comprehensive Rust

2.3 所有权

03-所有权 — Comprehensive Rust

2.4 移动语义

04-移动语义 — Comprehensive Rust

2.5 `Clone`

05-Clone — Comprehensive Rust

2.6 Copy 类型

06-Copy 类型 — Comprehensive Rust

2.7 `Drop`

07-Drop — Comprehensive Rust

2.8 练习:构建器类型

练习:构建器类型 — Comprehensive Rust

最后修改 August 11, 2026: 更新 (70a5af133)