(Solved)Question about Stack and Heap
I wanted to know if I really understood this so I am gonna ask. So the values of the variables of a object are stored in stack...But the addresses of all of the variables inside the stack that are from that object are referenced in the heap inside the object? Also the values of the variables in the object are in the stack only when we are using that object? I am not sure if I understand this. Edit. Ok, finally I found an answer that satisfy me: 1) https://jonskeet.uk/csharp/memory.html 2)And https://stackoverflow.com/questions/21520774/object-class-primitive-types-stack-and-heap from Eric Lippert. Other interesting sources: https://stackoverflow.com/questions/2565331/fields-of-class-are-they-stored-in-the-stack-or-heap https://stackoverflow.com/questions/5996751/is-an-int-inside-a-class-stored-on-the-stack-or-the-heap