File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ memory management. Which is the point, really: Rust is about control. However we
19
19
are not limited to just memory. Pretty much every other system resource like a
20
20
thread, file, or socket is exposed through this kind of API.
21
21
-->
22
- このパターンを簡単に説明すると以下のようになります。リソースの獲得時に
23
- 操作の対象となるオブジェクトの初期化を行い、リソースの解放時には単にその
24
- オブジェクトを破棄すればあとはリソースのクリーンアップを勝手に行ってくれる、
25
- いうものです。ここでいう 「リソース」とは単に ** メモリ** のことです。 ` Box ` 、 ` Rc ` 、
26
- その他` std::collections ` の諸々全ては、メモリの管理を便利にするためのものです。
22
+ このパターンを簡単に説明すると次のようになります。「リソースを獲得するには
23
+ そのリソースを管理するオブジェクトを作成し、リソースを解放するにはその
24
+ オブジェクトを単に破棄すればリソースがクリーンアップされる。」
25
+ いうものです。このように管理される最も一般的な 「リソース」は単なる ** メモリ** です。
26
+ ` Box ` 、 ` Rc ` 、 その他` std::collections ` の諸々全ては、メモリの管理を便利にするためのものです。
27
27
Rustの場合、メモリの管理において一貫したGCに頼るということができないので、これら
28
28
は特に重要になります。大事なことなので強調しましょう。この「管理」という考え方は
29
29
Rustの根幹です。それは何もメモリに限った話ではありません。スレッド、ファイル、
You can’t perform that action at this time.
0 commit comments