... resp. v C# je to trochu zlozitejsie (to s tym ak new tak halda sa da aplikovat na C++), pre C# si kukni napr. http://www.c-sharpcorner.com/UploadFile/rmcochran/ csharp_memory01122006130034PM/csharp_memory.aspx?A rticleID=9adb0e3c-b3f6-40b5-98b5-413b6d348b91
idealne precitat si to cele ak tomu chces aj rozumiet.Here are our two golden rules:
A Reference Type always goes on the Heap - easy enough, right?
Value Types and Pointers always go where they were declared. This is a little more complex and needs a bit more understanding of how the Stack works to figure out where "things" are declared.