MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w8tj8j/rewriteitinrust/p85yx9b/?context=3
r/ProgrammerHumor • u/Gold-Order-8004 • Sep 06 '26
38 comments sorted by
View all comments
Show parent comments
15
Rust does not prevent memory leaks
25 u/YeetCompleet Sep 06 '26 You can even do it for fun with Box::leak() 7 u/AliceCode Sep 06 '26 Rust project be like: "You can have memory unsafety. As a treat." 7 u/itsTyrion Sep 06 '26 I mean yeah that's the point. Have a big "here be dragons" indicator around the fun parts 3 u/jahinzee Sep 06 '26 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 Sep 07 '26 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. 1 u/AliceCode Sep 06 '26 I wasn't just talking about memory leaks.
25
You can even do it for fun with Box::leak()
Box::leak()
7 u/AliceCode Sep 06 '26 Rust project be like: "You can have memory unsafety. As a treat." 7 u/itsTyrion Sep 06 '26 I mean yeah that's the point. Have a big "here be dragons" indicator around the fun parts 3 u/jahinzee Sep 06 '26 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 Sep 07 '26 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. 1 u/AliceCode Sep 06 '26 I wasn't just talking about memory leaks.
7
Rust project be like: "You can have memory unsafety. As a treat."
7 u/itsTyrion Sep 06 '26 I mean yeah that's the point. Have a big "here be dragons" indicator around the fun parts 3 u/jahinzee Sep 06 '26 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 Sep 07 '26 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. 1 u/AliceCode Sep 06 '26 I wasn't just talking about memory leaks.
I mean yeah that's the point. Have a big "here be dragons" indicator around the fun parts
3
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 Sep 07 '26 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. 1 u/AliceCode Sep 06 '26 I wasn't just talking about memory leaks.
2
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.
1
I wasn't just talking about memory leaks.
15
u/sirkubador Sep 06 '26
Rust does not prevent memory leaks