Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
t43562
84 days ago
|
parent
|
context
|
favorite
| on:
Arenas in Rust
I've written utility programs that never bother to deallocate memory because the program needs all of it until the point where it exits anyhow.
estebank
84 days ago
[–]
You can do the same in Rust with Box::leak, which takes an owned pointer and gives you back a 'static borrow. The only caveat is that unless you reconstitute the type its Drop impl won't be called, but that's likely exactly what you wanted.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: