Re: dot net and stack




No, that is not correct. I think what they mean to say is that _locals_ are
allocated from stack - as opposed to from the heap. Obviously, an object
field, say, of value type is stored within the object BLOB (if you will).

Thank you.

I suspect the author just did not consider the possibility of declaring a value variable in a module, but not in a class or procedure.

Jon
.



Relevant Pages

  • Re: dot net and stack
    ... variables on the stack ONLY inside procedures and functions. ... Is the book correct? ... If I declare a global integer ... field, say, of value type is stored within the object BLOB. ...
    (borland.public.delphi.non-technical)
  • Re: Creating member vars on the heap, not the stack
    ... on the heap, not the stack. ... Other than declaring all the members of the class as static, ...
    (microsoft.public.vc.language)
  • Re: Passing more than 1 param in AfxBeginThread
    ... what is the difference between declaring the the pointer *p on the heap and then deleting after finishing with it, and just declaring it on the stack? ... If you declare a variable on the stack it disappears when the function ...
    (microsoft.public.vc.mfc)
  • Re: Passing more than 1 param in AfxBeginThread
    ... what is the difference between declaring the the pointer *p on the heap and then deleting after finishing with it, and just declaring it on the stack? ... What i want to know is when should i declare a var on the heap instead of on the stack? ...
    (microsoft.public.vc.mfc)