Hacker News new | ask | show | jobs
by pdpi 2813 days ago
The same way that memory leaks are possible in Java: rather than a technical bug (you forgot to `free` some buffer), instead you have a semantical bug (you're holding on to a pointer to the data after you're done with it, and that keeps the data alive).

Granted, the ownership/borrowing semantics of rust make this a lot harder, but anything that uses Rc/Arc can easily fall prey to it — you can use those to create a reference cycle.

1 comments

ye olde "stick it in a hash map and forget about it". :)
Or ye olde “register a callback and never remove it”.