Skip to content

Commit b0934a1

Browse files
committed
Let the OS clean up our memory usage
1 parent 72e2865 commit b0934a1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

platform/src/main.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ fn main() {
1212

1313
let out = host::call_the_closure(buffer);
1414

15-
println!("This print statement fixes a segfault.");
16-
17-
std::alloc::dealloc(buffer, layout);
15+
// TODO: deallocation currently causes a segfault (probably because layout doesn't match main's size).
16+
// investigate why this is and then re-enable this, rather than letting the system clean up the memory.
17+
//
18+
// std::alloc::dealloc(buffer, layout);
1819

1920
std::process::exit(out);
2021
}

0 commit comments

Comments
 (0)