Smart pointers prevent leaks, not use after free. Borrow checking prevents use after free, not leaks. There's no meaningful memory safety unless you have both.
-
Show this thread
-
Replying to @pcwalton
isn't Rust quite literally built on the fact that leaks are safe?
2 replies 0 retweets 4 likes -
Replying to @whitequark @pcwalton
leaks are allowed to be caused in safe code, doesn't mean it's /easy/ to leak
1 reply 0 retweets 0 likes -
I think Patrick's point is "memory safety is easy and not worth much if you don't try to prevent leaks"
1 reply 0 retweets 2 likes -
Replying to @ManishEarth @whitequark
I never thought of it that way, but it’s mostly true, yeah. (I say “mostly” because there’s still the problem of &mut borrows being invalidated by Vec::push or whatever)
1 reply 0 retweets 1 like -
Replying to @pcwalton @ManishEarth
When formulated this way it feels like a kind of a trick argument to me. :S
2 replies 0 retweets 0 likes
Fair enough. That isn’t the main point I was trying to make, anyway…the main idea is that smart pointers aren’t enough.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.