File tree 2 files changed +6
-0
lines changed
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,8 @@ fn main() {
41
41
42
42
Of course, we can double check for memory errors using [ ` valgrind ` ] [ valgrind ] :
43
43
44
+ <!-- REUSE-IgnoreStart -->
45
+ <!-- Prevent REUSE from parsing the copyright statement in the sample code -->
44
46
``` shell
45
47
$ rustc raii.rs && valgrind ./raii
46
48
==26873== Memcheck, a memory error detector
@@ -58,6 +60,7 @@ $ rustc raii.rs && valgrind ./raii
58
60
==26873== For counts of detected and suppressed errors, rerun with: -v
59
61
==26873== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)
60
62
```
63
+ <!-- REUSE-IgnoreEnd -->
61
64
62
65
No leaks here!
63
66
Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ fn main() {
34
34
35
35
Let's check that ` panic! ` doesn't leak memory.
36
36
37
+ <!-- REUSE-IgnoreStart -->
38
+ <!-- Prevent REUSE from parsing the copyright statement in the sample code -->
37
39
``` shell
38
40
$ rustc panic.rs && valgrind ./panic
39
41
==4401== Memcheck, a memory error detector
@@ -52,3 +54,4 @@ thread '<main>' panicked at 'division by zero', panic.rs:5
52
54
==4401== For counts of detected and suppressed errors, rerun with: -v
53
55
==4401== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
54
56
```
57
+ <!-- REUSE-IgnoreEnd -->
You can’t perform that action at this time.
0 commit comments