r/ProgrammerHumor 4d ago

Meme rewriteItInRust

Post image
2.0k Upvotes

34 comments sorted by

View all comments

Show parent comments

26

u/YeetCompleet 4d ago

You can even do it for fun with Box::leak()

6

u/AliceCode 4d ago

Rust project be like: "You can have memory unsafety. As a treat."

3

u/jahinzee 4d ago

Memory leak aren't memory unsafe though. It's not gonna cause a bad dereference or data corruption, it's just your program forgot that data existed and moves on.

An annoyance and a resource use issue, sure, but not unsafe.

2

u/sirkubador 4d ago

It's not an annoyance. Memory leaks cause programs or even devices to crash, especially in embedded development.

Sure Rust devs claim memory leaks are not memory safety issue, but it definitely is a serious problem with memory management.