How do the instance variable (valueTypes) inside an object (i.e. reference type) gets stored/Saved in Stack or Heap??? RRS feed

  • Question


    Hello All,


    Following is my understanding

    ·          Reference type gets Saved/Stored in Heap

    ·          Value type gets Saved/Stored in Stack


    So my question is how do the instance variable (valueTypes) inside an object (i.e. Reference type) gets stored/Saved in an object


    My Guess

    If the object has the reference of the instance variable (valueTypes) Stored in Stack, So isn’t  CLR needs to resolve the reference of all the variable stored in Stack? What happens if there are 10,000 instance variable (ValueType) in an object i.e. reference type…. Do the CLR needs to resolve 10,000 references???



    Please help me in understanding this is concern.

    • Moved by YiChun Chen Monday, September 28, 2009 4:14 AM CLR issue (From:.NET Framework Setup)
    Thursday, September 24, 2009 7:20 PM


All replies