@yminsky .NET has always had a similar story, but more explicit. There are two kinds of types in .NET: value types and reference types. Locals and parameters of value type are always stack allocated. References are heap allocated. There's also a 'managed ref' which can point to either, and has a lifetime that is implicitly tracked.
This whole deal is much more implicit and has fewer safeguards, but generally works.