Click here to Skip to main content
15,921,905 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralThen where are they allocated! Pin
Owner drawn26-Dec-05 18:57
Owner drawn26-Dec-05 18:57 
General[Message Deleted] Pin
Sheng Jiang 蒋晟26-Dec-05 19:41
Sheng Jiang 蒋晟26-Dec-05 19:41 
GeneralRe: Then where are they allocated! Pin
Owner drawn26-Dec-05 19:53
Owner drawn26-Dec-05 19:53 
General[Message Deleted] Pin
Sheng Jiang 蒋晟26-Dec-05 20:08
Sheng Jiang 蒋晟26-Dec-05 20:08 
GeneralRe: Then where are they allocated! Pin
Owner drawn26-Dec-05 20:39
Owner drawn26-Dec-05 20:39 
GeneralRe: Then where are they allocated! Pin
Sheng Jiang 蒋晟26-Dec-05 20:44
Sheng Jiang 蒋晟26-Dec-05 20:44 
GeneralRe: Then where are they allocated! Pin
asdfkjsodifuweior26-Dec-05 21:17
asdfkjsodifuweior26-Dec-05 21:17 
GeneralRe: Then where are they allocated! Pin
Prakash Nadar27-Dec-05 0:16
Prakash Nadar27-Dec-05 0:16 
Owner drawn wrote:
But now if it is allocated on the HEAP do we have to do the cleaning by ourselves.


static variables are not allocated on the heap, so u dont free them. simple rule is that, what u dont allocated u dont have to free it.

Typically a binary is divided into sections, also called as the segments.

data segment
code segment &
stack segment.

so your application may have additional data segment for static data also which are typicaly a read/write segment.

Constant data are stored in read only segment.

All these segments are calculated at link time. i.e. the memory is allocated statically and not dynamically so u dont have to clean up anything.



Prakash
Questionhow to debug a hooker? Pin
Vincent_Fish26-Dec-05 17:18
Vincent_Fish26-Dec-05 17:18 
AnswerRe: how to debug a hooker? Pin
Sheng Jiang 蒋晟26-Dec-05 19:47
Sheng Jiang 蒋晟26-Dec-05 19:47 
AnswerRe: how to debug a hooker? Pin
Eytukan28-Dec-05 20:29
Eytukan28-Dec-05 20:29 
QuestionDrawDragRect() Pin
Rishi8226-Dec-05 17:11
Rishi8226-Dec-05 17:11 
AnswerRe: DrawDragRect() Pin
Owner drawn26-Dec-05 18:04
Owner drawn26-Dec-05 18:04 
GeneralRe: DrawDragRect() Pin
vikas amin26-Dec-05 19:01
vikas amin26-Dec-05 19:01 
GeneralRe: DrawDragRect() Pin
ThatsAlok26-Dec-05 19:10
ThatsAlok26-Dec-05 19:10 
Question[Message Deleted] Pin
javanull26-Dec-05 16:43
javanull26-Dec-05 16:43 
AnswerRe: how to write up bsearch function code Pin
Jack Puppy26-Dec-05 17:28
Jack Puppy26-Dec-05 17:28 
GeneralRe: how to write up bsearch function code Pin
javanull26-Dec-05 19:23
javanull26-Dec-05 19:23 
QuestionTurning off CListBox autosort? Pin
Lord Kixdemp26-Dec-05 12:52
Lord Kixdemp26-Dec-05 12:52 
AnswerRe: Turning off CListBox autosort? Pin
Tsikin Sandy26-Dec-05 15:19
Tsikin Sandy26-Dec-05 15:19 
AnswerRe: Turning off CListBox autosort? Pin
vikas amin26-Dec-05 19:07
vikas amin26-Dec-05 19:07 
GeneralRe: Turning off CListBox autosort? Pin
Lord Kixdemp27-Dec-05 14:24
Lord Kixdemp27-Dec-05 14:24 
QuestionMove Up/Down in ListBox? Pin
Lord Kixdemp26-Dec-05 12:03
Lord Kixdemp26-Dec-05 12:03 
JokeRe: Move Up/Down in ListBox? Pin
ChrisLang26-Dec-05 12:38
ChrisLang26-Dec-05 12:38 
GeneralRe: Move Up/Down in ListBox? Pin
Lord Kixdemp26-Dec-05 12:49
Lord Kixdemp26-Dec-05 12:49 

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.