News for hackers. Stuff that matters.
Re:Rust Memory Management by paupino_masano on Tuesday May 09, 2017 @10:44AM (#14300431)
C# and Java allocate objects to the heap and primitive types to the stack by default so perhaps it may be in context to that (i.e. It's not explicit but rather implicit on the type being used).
Re:Rust Memory Management by DorothySim on Tuesday May 09, 2017 @10:49AM (#14300470)
> C# and Java allocate objects to the heap and primitive types to the stack by default (...)

Note that it only applies to local variables. If you have a primitive inside an object then it's allocated on the heap as part of the outer object.

Re:Rust Memory Management by bogomipz on Tuesday May 09, 2017 @04:03PM (#14303352)
I see, that would make sense. Thanks.