4 ms·
You can leak memory in any complex project, even if you only use safe Rust. Linux kernel uses doubly linked lists, Redis uses doubly linked lists, V8 JS engine
by LudwigNagasena 2y ago
You can leak memory in any complex project, even if you only use safe Rust.
Linux kernel uses doubly linked lists, Redis uses doubly linked lists, V8 JS engine uses doubly linked lists. Have their authors chosen something obviously wrong?
- oneshtein 2y agoRust uses double linked lists, they are not harder to implement in Rust than in any other language. Moreover, built-in borrow checker will help to implement them properly, without memory leaks or use-after-free. What is your point?
- LudwigNagasena 2y agoMy point is that it's not obviously wrong to create cyclic references.
- oneshtein 2y agoOK, it's was obviously wrong to create cyclic references few years ago.
- LudwigNagasena 2y agoBut doubly linked lists use cyclic references…
- oneshtein 2y agoDouble linked lists use double links.