Quote:
You quoted me so I assume you read what I typed, but apparently you missed some vital parts of my statements, especially the ones where I mentioned overloading operator new for the Collision_Relay class, or even the global operator new. Go back and reread and you'll see why your response has left me baffled.
What I find baffling is how you seem to think one cannot use an overloaded operator new without using placement new or specifically implementing it for a class. Again, I assure you that you are wrong. The code reproduced above could easily be using a custom new implementation with all the gory details behind the scenes.
Quote:I know exactly what happens in the event of an unhandled exception. Your previous post was talking about assuming the user handled exceptions, which, I will re-iterate, has absolutely nothing to do with the problem(s) at hand.
And I will re-iterate that the entire discussion has nothing to do with the problem(s) at hand. The OP asked for help spotting a memory leak and received a response of "don't check for NULL returning from new because I say you shouldn't". My responses have been to illustrate that the assumptions behind that statement are flawed, and that when a person asks for help with a particular area of their code time is not best spent critiquing minor details that one may not even fully understand. Instead, why not look at the problem the person is asking about.