|
|
|
|
|
by dfkf
3997 days ago
|
|
There is no way to allocate objects of reference types on stack because references can easily outlive objects, leaving you with dangling references.
And as I understand ByVal in VB.NET is redundant since it's the default option. It's just a leftover from VB6 where the default was ByRef. Crazy language. |
|
That's simply due to a lack of analysis. In many cases it's easy to show the object is short lived. Yet there's no way to annotate this and AFAIK, the JIT doesn't even try to figure this out.