Click here to Skip to main content
15,903,632 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionClass initialization and memory allocation Pin
Christian Flutcher4-Sep-08 19:11
Christian Flutcher4-Sep-08 19:11 
AnswerRe: Class initialization and memory allocation [modified] Pin
_AnsHUMAN_ 4-Sep-08 19:27
_AnsHUMAN_ 4-Sep-08 19:27 
GeneralRe: Class initialization and memory allocation Pin
Christian Flutcher4-Sep-08 19:40
Christian Flutcher4-Sep-08 19:40 
GeneralRe: Class initialization and memory allocation Pin
Cedric Moonen4-Sep-08 19:57
Cedric Moonen4-Sep-08 19:57 
GeneralRe: Class initialization and memory allocation Pin
Christian Flutcher4-Sep-08 20:20
Christian Flutcher4-Sep-08 20:20 
GeneralRe: Class initialization and memory allocation Pin
Cedric Moonen4-Sep-08 20:27
Cedric Moonen4-Sep-08 20:27 
GeneralRe: Class initialization and memory allocation Pin
Christian Flutcher4-Sep-08 20:29
Christian Flutcher4-Sep-08 20:29 
GeneralRe: Class initialization and memory allocation Pin
_AnsHUMAN_ 4-Sep-08 19:58
_AnsHUMAN_ 4-Sep-08 19:58 
The stack is where memory is allocated for automatic variables within functions. The memory allocated in the stack area is used and reused during program execution. It should be clear that memory allocated in this area will contain garbage values left over from previous usage.

The heap segment provides more stable storage of data for a program; memory allocated in the heap remains in existence for the duration of a program. Therefore, global variables (storage class external), and static variables are allocated on the heap. The memory allocated in the heap area, if initialized to zero at program start, remains zero until the program makes use of it. Thus, the heap area need not contain garbage.

Somethings seem HARD to do, until we know how to do them.
Wink | ;-) _AnShUmAn_

GeneralRe: Class initialization and memory allocation Pin
Rajesh R Subramanian4-Sep-08 20:16
professionalRajesh R Subramanian4-Sep-08 20:16 
GeneralRe: Class initialization and memory allocation Pin
_AnsHUMAN_ 4-Sep-08 20:29
_AnsHUMAN_ 4-Sep-08 20:29 
GeneralRe: Class initialization and memory allocation Pin
Naveen4-Sep-08 20:23
Naveen4-Sep-08 20:23 
GeneralRe: Class initialization and memory allocation Pin
Rajesh R Subramanian4-Sep-08 20:00
professionalRajesh R Subramanian4-Sep-08 20:00 
GeneralRe: Class initialization and memory allocation Pin
Christian Flutcher4-Sep-08 20:17
Christian Flutcher4-Sep-08 20:17 
GeneralRe: Class initialization and memory allocation Pin
Cedric Moonen4-Sep-08 20:25
Cedric Moonen4-Sep-08 20:25 
GeneralRe: Class initialization and memory allocation Pin
Rajesh R Subramanian4-Sep-08 20:25
professionalRajesh R Subramanian4-Sep-08 20:25 
GeneralRe: Class initialization and memory allocation Pin
Christian Flutcher4-Sep-08 20:31
Christian Flutcher4-Sep-08 20:31 
GeneralRe: Class initialization and memory allocation Pin
Rajesh R Subramanian4-Sep-08 20:42
professionalRajesh R Subramanian4-Sep-08 20:42 
AnswerRe: Class initialization and memory allocation Pin
santhoshv844-Sep-08 19:27
santhoshv844-Sep-08 19:27 
GeneralRe: Class initialization and memory allocation Pin
Christian Flutcher4-Sep-08 19:44
Christian Flutcher4-Sep-08 19:44 
Questionproblem with inno setup.... Pin
shaina22314-Sep-08 19:00
shaina22314-Sep-08 19:00 
AnswerRe: problem with inno setup.... Pin
santhoshv844-Sep-08 19:12
santhoshv844-Sep-08 19:12 
GeneralRe: problem with inno setup.... Pin
shaina22314-Sep-08 19:19
shaina22314-Sep-08 19:19 
GeneralRe: problem with inno setup.... Pin
santhoshv844-Sep-08 19:31
santhoshv844-Sep-08 19:31 
GeneralRe: problem with inno setup.... Pin
SandipG 4-Sep-08 20:12
SandipG 4-Sep-08 20:12 
Questioncreate structure in exe and call in DLL Pin
samrw4-Sep-08 18:48
samrw4-Sep-08 18:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.