Hacker News new | comments | show | ask | jobs | submit login

That's crazy! I always thought objects were stack allocated by default unless escape analysis showed them to escape the function return. Goes to show how little I know about .Net memory allocation..

Could you elaborate on what the problems would be with storing on the stack? I'm oblivious to what the problem would be. Stack relocation?

AFAIK no .net JIT does do escape analysis, at all. It's less of a problem than you might think because value types are allocated on the stack anyways.

no escape analysis in .NET, yet, it is coming. set

I wouldn't hold out too much hope. Java always intended for escape analysis to remove the need for value types. Now they're adding value types.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact