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

C / C++ / MFC

 
GeneralRe: Operator new and delete mechanism! Pin
Cedric Moonen12-Apr-05 0:25
Cedric Moonen12-Apr-05 0:25 
GeneralRe: Operator new and delete mechanism! Pin
Cedric Moonen12-Apr-05 1:17
Cedric Moonen12-Apr-05 1:17 
GeneralRe: Operator new and delete mechanism! Pin
toxcct12-Apr-05 0:32
toxcct12-Apr-05 0:32 
GeneralRe: Operator new and delete mechanism! Pin
sunit512-Apr-05 2:54
sunit512-Apr-05 2:54 
GeneralRe: Operator new and delete mechanism! Pin
Cedric Moonen12-Apr-05 3:06
Cedric Moonen12-Apr-05 3:06 
GeneralRe: Operator new and delete mechanism! Pin
S. Senthil Kumar12-Apr-05 5:55
S. Senthil Kumar12-Apr-05 5:55 
GeneralRe: Operator new and delete mechanism! Pin
Rick York12-Apr-05 9:24
mveRick York12-Apr-05 9:24 
GeneralRe: Operator new and delete mechanism! Pin
Ryan Binns12-Apr-05 18:37
Ryan Binns12-Apr-05 18:37 
Rick York wrote:
I had serious doubts about your statement, "The C++ delete operator takes care of the case where the pointer is NULL." So I did some digging in the CRT library source. It turns out that this statement is not totally correct. The C++ delete operator just ends up calling _free_dbg and that checks for a null pointer. In the end the null pointer is caught though and that is the bottom line.

The C++ standard dictates that the delete operator must handle a NULL pointer being passed to it correctly. It makes no difference where, it will always be the case for a reasonably standards-compliant compiler/library (I don't know of any which don't obey this)

Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

GeneralRe: Operator new and delete mechanism! Pin
S. Senthil Kumar12-Apr-05 19:39
S. Senthil Kumar12-Apr-05 19:39 
GeneralProblem with OnNotify Pin
thanh-hai.bui12-Apr-05 0:13
thanh-hai.bui12-Apr-05 0:13 
GeneralRe: Problem with OnNotify Pin
Joel Holdsworth12-Apr-05 2:07
Joel Holdsworth12-Apr-05 2:07 
GeneralRe: Problem with OnNotify Pin
thanh-hai.bui12-Apr-05 3:15
thanh-hai.bui12-Apr-05 3:15 
GeneralRe: Problem with OnNotify Pin
Joel Holdsworth12-Apr-05 4:10
Joel Holdsworth12-Apr-05 4:10 
GeneralRe: Problem with OnNotify Pin
Ryan Binns12-Apr-05 18:43
Ryan Binns12-Apr-05 18:43 
GeneralRe: Problem with OnNotify Pin
thanh-hai.bui12-Apr-05 21:46
thanh-hai.bui12-Apr-05 21:46 
QuestionHow to pass string in DLL? Pin
Member 184868012-Apr-05 0:04
Member 184868012-Apr-05 0:04 
QuestionHow to pass string in DLL? Pin
Member 184868012-Apr-05 0:01
Member 184868012-Apr-05 0:01 
AnswerRe: How to pass string in DLL? [edited] Pin
toxcct12-Apr-05 0:08
toxcct12-Apr-05 0:08 
GeneralRe: How to pass string in DLL? Pin
Cedric Moonen12-Apr-05 1:31
Cedric Moonen12-Apr-05 1:31 
GeneralRe: How to pass string in DLL? [edited] Pin
Cedric Moonen12-Apr-05 2:06
Cedric Moonen12-Apr-05 2:06 
AnswerRe: How to pass string in DLL? Pin
Francesco Aruta12-Apr-05 8:46
Francesco Aruta12-Apr-05 8:46 
GeneralRe: How to pass string in DLL? Pin
Rick York12-Apr-05 9:30
mveRick York12-Apr-05 9:30 
GeneralRe: How to pass string in DLL? Pin
Francesco Aruta12-Apr-05 9:53
Francesco Aruta12-Apr-05 9:53 
GeneralRe: How to pass string in DLL? Pin
Cedric Moonen12-Apr-05 20:55
Cedric Moonen12-Apr-05 20:55 
GeneralRe: How to pass string in DLL? Pin
Francesco Aruta13-Apr-05 0:19
Francesco Aruta13-Apr-05 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.