Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
tests
/
pointers
/
manual_free_stack_value_test.v
14
lines
·
11
sloc
·
179 bytes
·
a53626544a7ee19113a75b1cc0dd80586c49a9a3
Raw
1
module
main
2
3
struct
Hc256 {}
4
5
@[unsafe]
6
fn
(
mut
h Hc256) free() {
7
unsafe { free(h) }
8
}
9
10
fn
test_manual_free_stack_value() {
11
mut
h := Hc256{}
12
unsafe { h.free() }
13
assert
true
14
}
15