Click here to Skip to main content
15,917,991 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: errors adding to windows form creator Pin
Member 79972643-Apr-12 15:10
Member 79972643-Apr-12 15:10 
AnswerRe: errors adding to windows form creator Pin
Richard Andrew x643-Apr-12 15:16
professionalRichard Andrew x643-Apr-12 15:16 
GeneralRe: errors adding to windows form creator Pin
Member 79972643-Apr-12 17:25
Member 79972643-Apr-12 17:25 
AnswerRe: errors adding to windows form creator Pin
Wes Aday3-Apr-12 15:23
professionalWes Aday3-Apr-12 15:23 
GeneralRe: errors adding to windows form creator Pin
Member 79972643-Apr-12 17:50
Member 79972643-Apr-12 17:50 
GeneralRe: errors adding to windows form creator Pin
Wes Aday4-Apr-12 1:48
professionalWes Aday4-Apr-12 1:48 
Questiondelete pointer Pin
ITISAG3-Apr-12 11:03
ITISAG3-Apr-12 11:03 
AnswerRe: delete pointer Pin
Chuck O'Toole3-Apr-12 11:19
Chuck O'Toole3-Apr-12 11:19 
ARRRRGH. You overwrite pBuffer with the result of CString's GetBuffer(), which gives you a pointer to a buffer you don't own. Then you try to delete it. BOOM.

You cannot delete the pointer returned by GetBuffer(), that memory belongs to the CString Object and it will delete it when the object is deleted or goes out of scope.

Plus, you've lost the pointer to the char[1024] that you did allocate with new, leaving a memory leak for that memory.
GeneralRe: delete pointer Pin
ITISAG3-Apr-12 11:21
ITISAG3-Apr-12 11:21 
AnswerRe: delete pointer Pin
Chuck O'Toole3-Apr-12 11:31
Chuck O'Toole3-Apr-12 11:31 
GeneralRe: delete pointer Pin
ITISAG3-Apr-12 11:26
ITISAG3-Apr-12 11:26 
AnswerRe: delete pointer Pin
Chuck O'Toole3-Apr-12 11:34
Chuck O'Toole3-Apr-12 11:34 
GeneralRe: delete pointer Pin
Richard MacCutchan3-Apr-12 22:00
mveRichard MacCutchan3-Apr-12 22:00 
GeneralRe: delete pointer Pin
ggggfjeicfh5-Apr-12 16:26
ggggfjeicfh5-Apr-12 16:26 
GeneralRe: delete pointer Pin
ggggfjeicfh5-Apr-12 16:40
ggggfjeicfh5-Apr-12 16:40 
QuestionmousePress crash 64 bit mfc application Pin
appollosputnik3-Apr-12 8:11
appollosputnik3-Apr-12 8:11 
QuestionSocket Alive Pin
john56323-Apr-12 2:20
john56323-Apr-12 2:20 
QuestionRe: Socket Alive Pin
Code-o-mat3-Apr-12 4:51
Code-o-mat3-Apr-12 4:51 
AnswerRe: Socket Alive Pin
Richard Andrew x643-Apr-12 5:14
professionalRichard Andrew x643-Apr-12 5:14 
AnswerRe: Socket Alive Pin
jschell3-Apr-12 8:41
jschell3-Apr-12 8:41 
QuestionIOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS returns error code 87 INVALID_PARAMETER Pin
VCProgrammer2-Apr-12 21:47
VCProgrammer2-Apr-12 21:47 
AnswerRe: IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS returns error code 87 INVALID_PARAMETER Pin
Jochen Arndt2-Apr-12 23:36
professionalJochen Arndt2-Apr-12 23:36 
AnswerRe: IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS returns error code 87 INVALID_PARAMETER Pin
Richard MacCutchan2-Apr-12 23:44
mveRichard MacCutchan2-Apr-12 23:44 
GeneralRe: IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS returns error code 87 INVALID_PARAMETER Pin
VCProgrammer3-Apr-12 0:00
VCProgrammer3-Apr-12 0:00 
GeneralRe: IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS returns error code 87 INVALID_PARAMETER Pin
Richard MacCutchan3-Apr-12 0:19
mveRichard MacCutchan3-Apr-12 0:19 

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.