¡@

Home 

c++ Programming Glossary: aa01

Are data members allocated in the same memory space as their objects in C++?

http://stackoverflow.com/questions/187797/are-data-members-allocated-in-the-same-memory-space-as-their-objects-in-c

struct A A c new C B b C c void doSomething A aa00 A aa01 new A The object aa00 is allocated on the stack. As aa00 b is.. is allocated inside the memory range allocated by the new aa01 instruction. Thus aa00 b is also allocated on stack. But aa00.. designed by aa00 c is on the heap. Now the tricky example aa01 is allocated via a new and as such on the heap. In that case..