0

As I know (I don't know exactly) the main idea of Rust memory safety is based on the fact that it is compiled into a code that as an additional part has a code that detects unreachable objects and removes them. Java garbage collector treats it via separate thread, however I wonder whether it can check during the compile time unreachable staff on heap (objects that aren't referenced by any variable) and be translated into bytecode that will do that removal. (if it's not manageable in Java, why is it manageable in Rust? due to some type system that it uses?)

math boy
  • 394
  • 1
  • 13

0 Answers0