What does it mean?

  • Thread starter Thread starter Alexander.Zen
  • Start date Start date
A

Alexander.Zen

I read a clouse like following:
////////////////////////////////////////////////////
Struct values are stored either "on the stack" or "in-line".
////////////////////////////////////////////////////
and what does it mean?
 
I read a clouse like following:
////////////////////////////////////////////////////
Struct values are stored either "on the stack" or "in-line".
////////////////////////////////////////////////////
and what does it mean?

It means:

:: If a structure variable is a local variable in a method, the memory
for it is allocated on the stack when the method is called.

:: If a structure variable is a member of a class, the memory for it is
part of the memory area for the object, which is allocated on the heap.
 
It means:

:: If a structure variable is a local variable in a method, the memory
for it is allocated on the stack when the method is called.

:: If a structure variable is a member of a class, the memory for it is
part of the memory area for the object, which is allocated on the heap.

I get you , thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top