Click here to Skip to main content
15,897,704 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Return the Caption of Windows Pin
Hamid_RT25-Jun-06 2:14
Hamid_RT25-Jun-06 2:14 
GeneralRe: Return the Caption of Windows Pin
Stephen Hewitt25-Jun-06 3:19
Stephen Hewitt25-Jun-06 3:19 
QuestionQuestion about memory locations. Pin
Lord Kixdemp24-Jun-06 15:39
Lord Kixdemp24-Jun-06 15:39 
QuestionRe: Question about memory locations. Pin
Jun Du24-Jun-06 16:13
Jun Du24-Jun-06 16:13 
AnswerRe: Question about memory locations. Pin
Lord Kixdemp24-Jun-06 16:18
Lord Kixdemp24-Jun-06 16:18 
GeneralRe: Question about memory locations. Pin
Jun Du24-Jun-06 16:30
Jun Du24-Jun-06 16:30 
GeneralRe: Question about memory locations. Pin
Lord Kixdemp24-Jun-06 19:15
Lord Kixdemp24-Jun-06 19:15 
AnswerRe: Question about memory locations. Pin
Justin Tay25-Jun-06 0:28
Justin Tay25-Jun-06 0:28 
Actually Windows will release all the memory for your application when it closes. Releasing memory doesn't mean it will overwrite the memory as there's no point, it just means that anyone requesting memory can get it and write to it. That you actually managed to get the same string when you restarted the application was probably a fluke. For example, you could probably free the string in your application and then use the pointer to the string to print it out. Chances are it will work fine since no one else has gotten to it yet.Anyway I think you probably need a good book, my explanation isn't detailed enough, it's more complicated as each application gets it's own virtual address space and all that needs to be mapped.

The reason you use the free() function is so you don't leak memory while your application is running. This is especially important for server applications that have to run for long periods of time. Memory isn't the only thing you need to manage, there's other things like network resources, gdi resources etc. In C# you need to use a dispose pattern to free other resources so it's not like garbage collection is the holy grail.
GeneralRe: Question about memory locations. Pin
Jun Du25-Jun-06 1:57
Jun Du25-Jun-06 1:57 
GeneralRe: Question about memory locations. Pin
Justin Tay25-Jun-06 2:23
Justin Tay25-Jun-06 2:23 
GeneralRe: Question about memory locations. Pin
Lord Kixdemp26-Jun-06 21:58
Lord Kixdemp26-Jun-06 21:58 
GeneralRe: Question about memory locations. Pin
Justin Tay27-Jun-06 5:02
Justin Tay27-Jun-06 5:02 
GeneralRe: Question about memory locations. Pin
Lord Kixdemp27-Jun-06 8:57
Lord Kixdemp27-Jun-06 8:57 
GeneralRe: Question about memory locations. Pin
Justin Tay27-Jun-06 21:24
Justin Tay27-Jun-06 21:24 
GeneralRe: Question about memory locations. Pin
Lord Kixdemp1-Jul-06 17:00
Lord Kixdemp1-Jul-06 17:00 
QuestionApplication failed to initialize using Detours [modified] Pin
Sam Hobbs24-Jun-06 15:21
Sam Hobbs24-Jun-06 15:21 
QuestionIE Toolbar or BHO Images and Temp Folder Location Pin
Ranjan Banerji24-Jun-06 15:11
Ranjan Banerji24-Jun-06 15:11 
AnswerRe: IE Toolbar or BHO Images and Temp Folder Location Pin
Michael Dunn24-Jun-06 15:29
sitebuilderMichael Dunn24-Jun-06 15:29 
GeneralRe: IE Toolbar or BHO Images and Temp Folder Location Pin
Ranjan Banerji25-Jun-06 5:51
Ranjan Banerji25-Jun-06 5:51 
GeneralRe: IE Toolbar or BHO Images and Temp Folder Location Pin
Michael Dunn25-Jun-06 7:55
sitebuilderMichael Dunn25-Jun-06 7:55 
GeneralRe: IE Toolbar or BHO Images and Temp Folder Location Pin
Ranjan Banerji25-Jun-06 8:01
Ranjan Banerji25-Jun-06 8:01 
QuestionUnhandled Exception when outputting strings [modified] Pin
capricious_00124-Jun-06 12:50
capricious_00124-Jun-06 12:50 
AnswerRe: Unhandled Exception when outputting strings Pin
Michael Dunn24-Jun-06 13:00
sitebuilderMichael Dunn24-Jun-06 13:00 
GeneralRe: Unhandled Exception when outputting strings Pin
capricious_00124-Jun-06 13:16
capricious_00124-Jun-06 13:16 
AnswerRe: Unhandled Exception when outputting strings Pin
Jun Du24-Jun-06 13:22
Jun Du24-Jun-06 13:22 

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.