Click here to Skip to main content
16,016,795 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Add User Pin
Anilkumar K V25-Oct-06 20:04
Anilkumar K V25-Oct-06 20:04 
AnswerRe: Add User Pin
Programm3r25-Oct-06 4:10
Programm3r25-Oct-06 4:10 
QuestionRe: Add User Pin
David Crow25-Oct-06 5:45
David Crow25-Oct-06 5:45 
GeneralRe: Add User Pin
Anilkumar K V25-Oct-06 20:13
Anilkumar K V25-Oct-06 20:13 
Questionscope in functions Pin
minkowski25-Oct-06 0:32
minkowski25-Oct-06 0:32 
AnswerRe: scope in functions Pin
toxcct25-Oct-06 0:40
toxcct25-Oct-06 0:40 
GeneralRe: scope in functions Pin
minkowski25-Oct-06 0:56
minkowski25-Oct-06 0:56 
GeneralRe: scope in functions Pin
benjymous25-Oct-06 1:14
benjymous25-Oct-06 1:14 
That's not correct.

Deleting something (or letting it go out of scope) doesn't erase the memory it was using, it just marks it as unused, so the memory manager is free to reuse that memory at any point.

Basically the same as happens when you delete a file from your HDD - undelete tools can recover it, because whilst the file entry is removed from the file table on the disk, the actual data is still there, until it gets overwritten by something else.

In the case of your example, nothing is happening between your creation of the pointer, and the access of the "deleted" memory, but in a bigger example it is less likely to survive intact.

--
Help me! I'm turning into a grapefruit!
Buzzwords!

AnswerRe: scope in functions Pin
Tim Paaschen25-Oct-06 0:46
Tim Paaschen25-Oct-06 0:46 
GeneralRe: scope in functions Pin
minkowski25-Oct-06 0:58
minkowski25-Oct-06 0:58 
GeneralRe: scope in functions Pin
Tim Paaschen25-Oct-06 1:03
Tim Paaschen25-Oct-06 1:03 
AnswerRe: scope in functions Pin
kakan25-Oct-06 1:10
professionalkakan25-Oct-06 1:10 
GeneralRe: scope in functions Pin
benjymous25-Oct-06 1:24
benjymous25-Oct-06 1:24 
GeneralRe: scope in functions Pin
kakan25-Oct-06 1:53
professionalkakan25-Oct-06 1:53 
GeneralRe: scope in functions Pin
benjymous25-Oct-06 3:29
benjymous25-Oct-06 3:29 
GeneralRe: scope in functions [modified] Pin
toxcct25-Oct-06 1:41
toxcct25-Oct-06 1:41 
GeneralRe: scope in functions [modified] Pin
kakan25-Oct-06 1:53
professionalkakan25-Oct-06 1:53 
GeneralRe: scope in functions Pin
toxcct25-Oct-06 2:25
toxcct25-Oct-06 2:25 
GeneralRe: scope in functions Pin
kakan25-Oct-06 3:26
professionalkakan25-Oct-06 3:26 
GeneralRe: scope in functions Pin
toxcct25-Oct-06 3:31
toxcct25-Oct-06 3:31 
GeneralRe: scope in functions Pin
kakan25-Oct-06 3:46
professionalkakan25-Oct-06 3:46 
GeneralRe: scope in functions Pin
toxcct25-Oct-06 3:51
toxcct25-Oct-06 3:51 
GeneralRe: scope in functions Pin
kakan25-Oct-06 4:01
professionalkakan25-Oct-06 4:01 
GeneralRe: scope in functions Pin
minkowski25-Oct-06 4:07
minkowski25-Oct-06 4:07 
GeneralRe: scope in functions Pin
kakan25-Oct-06 4:10
professionalkakan25-Oct-06 4:10 

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.