this post was submitted on 21 Nov 2025
277 points (96.3% liked)

Technology

77096 readers
4336 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] dhork@lemmy.world 157 points 6 days ago (8 children)

Just because you’re writing in a shiny new language that never misses an opportunity to crow about how memory safe it is, doesn’t mean that you can skip due diligence on input validation, checking every return value and writing exception handlers for even the most unlikely of situations.

Lol

[–] SeductiveTortoise@piefed.social 48 points 6 days ago (6 children)

But at least it wasn't a memory leak!!! 😭😭😭

[–] Noja@sopuli.xyz 25 points 6 days ago (5 children)

Memory leaks are logic errors, Rust can't really prevent you from leaking memory.

[–] calcopiritus@lemmy.world 20 points 6 days ago (2 children)

It's really hard to do without Rc (or similar) or unsafe.

[–] Mechanize@feddit.it 30 points 6 days ago* (last edited 6 days ago) (1 children)

You can leak memory in perfectly safe Rust, because it is not a bug per se, an example is by using Box::leak

Preventing memory leaks was never in the intentions of Rust. What it tries to safeguard you from are Memory Safety bugs like the infamous and common double free.

[–] 8uurg@lemmy.world 3 points 5 days ago

And it still cleans up once the ownership model indicates it can be cleaned up. That does not ensure memory is never leaked, but it is equivalent to destructors running automatically when using unique ptr or shared ptr without cycles in C++, which avoids at least a portion of possible memory leaks.

load more comments (2 replies)
load more comments (2 replies)
load more comments (3 replies)