検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 11 for heap (0.020 sec.)
所有権とムーブ - Rust By Example 日本語版 12304
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... を防げます。 // This function takes ownership of the heap allocated memory // この関数はヒープメモリ上の資源 ... {}, and y is {}", x, y); // `a` is a pointer to a _heap_ allocated integer // `a`は_ヒープ_上の整数へのポイ ... ta) into `b`. // Both are now pointers to the same heap allocated data, but // `b` now owns it. // すなわち ... access the data, because it no longer owns the // heap memory // エラー! `a`は所有権を持たないため、ヒープ ...
https://man.plustar.jp/rust/example/scope/move.html - [similar]
RAII - Rust By Example 日本語版 11362
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... rs fn create_box() { // Allocate an integer on the heap // 整数をヒープ上に確保 let _box1 = Box::new(3i32) ... される。 } fn main() { // Allocate an integer on the heap // 整数をヒープ上に確保 let _box2 = Box::new(5i32) ... ネストしたスコープ { // Allocate an integer on the heap // 整数をヒープ上に確保 let _box3 = Box::new(4i32) ... 73== Command: ./raii ==26873== ==26873== ==26873== HEAP SUMMARY: ==26873== in use at exit: 0 bytes in 0 bl ...
https://man.plustar.jp/rust/example/scope/raii.html - [similar]
Returning Traits with dyn - Rust By Example 日本語版 10028
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... . A box is just a reference to some memory in the heap. Because a reference has a statically-known size, ... and the compiler can guarantee it points to a heap-allocated Animal , we can return a trait from our ... it as possible whenever it allocates memory on the heap. So if your function returns a pointer-to-trait-on ... -heap in this way, you need to write the return type wit ...
https://man.plustar.jp/rust/example/trait/dyn.html - [similar]
panic! - Rust By Example 日本語版 9851
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... / The `main` task // `main`のタスク fn main() { // Heap allocated integer // ヒープ上の整数 let _x = Box:: ... t 'division by zero', panic.rs:5 ==4401== ==4401== HEAP SUMMARY: ==4401== in use at exit: 0 bytes in 0 blo ... cks ==4401== total heap usage: 18 allocs, 18 frees, 1,648 bytes allocated ... ==4401== ==4401== All heap blocks were freed -- no leaks are possible ==4401= ...
https://man.plustar.jp/rust/example/std/panic.html - [similar]
テストケース: 連結リスト - Rust By Example 日本語版 9655
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... > 0 } } // Return representation of the list as a (heap allocated) string // Listをheap上の文字列として表し ... // `format!` is similar to `print!`, but returns a heap // allocated string instead of printing to the con ... `に似ているが、コンソール上に出力 // する代わりに、heap上の文字列を返す。 format!("{}, {}", head, tail.stri ...
https://man.plustar.jp/rust/example/custom_types/enum/testcase_linked_list.html - [similar]
Arc - Rust By Example 日本語版 8144
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... pointer for the location of a value in the memory heap while increasing the reference counter. As it shar ... as it is a pointer to a reference // in the memory heap. let apple = Arc::clone(&apple); thread::spawn(mov ...
https://man.plustar.jp/rust/example/std/arc.html - [similar]
Box, スタックとヒープ - Rust By Example 日本語版 7948
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... in() -> Box<Point> { // Allocate this point on the heap, and return a pointer to it // このPointをヒープ上 ... n(), bottom_right: Point { x: 3.0, y: -4.0 } }; // Heap allocated rectangle // ヒープ上に割り当てられたRec ...
https://man.plustar.jp/rust/example/std/box.html - [similar]
Rust By Example 日本語版 7379
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... > 0 } } // Return representation of the list as a (heap allocated) string // Listをheap上の文字列として表し ... // `format!` is similar to `print!`, but returns a heap // allocated string instead of printing to the con ... `に似ているが、コンソール上に出力 // する代わりに、heap上の文字列を返す。 format!("{}, {}", head, tail.stri ... self.p2.y += y; } } // `Pair` owns resources: two heap allocated integers // `Pair`はヒープ上の整数を2つ保 ...
https://man.plustar.jp/rust/example/print.html - [similar]
メソッド - Rust By Example 日本語版 7006
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... self.p2.y += y; } } // `Pair` owns resources: two heap allocated integers // `Pair`はヒープ上の整数を2つ保 ...
https://man.plustar.jp/rust/example/fn/methods.html - [similar]
文字列 - Rust By Example 日本語版 7006
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ; println!("Used characters: {}", trimmed_str); // Heap allocate a string // 文字列をヒープに割り当てる。 ...
https://man.plustar.jp/rust/example/std/str.html - [similar]
PREV 1 2 NEXT