Kaydet (Commit) 3a2929e3 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

If we want this to crash intentionally, use abort() then

free(NULL) does not crash, it is defined to do nothing. Did I not know
that in 2010?

Change-Id: Ia6c4817ea87b646d643a19daabfe7850c5416cc8
üst 08aab3de
......@@ -62,15 +62,15 @@ void SimpleReferenceObject::operator delete(void * pPtr, std::nothrow_t const &)
#ifdef _MSC_VER
/* This operator is supposed to be unimplemented, but that now leads
* to compilation and/or linking errors with MSVC2008. (Don't know
* about MSVC2010.) As it can be left unimplemented just fine with
* gcc, presumably it is never called. So do implement it then to
* avoid the compilation and/or linking errors, but make it crash
* intentionally if called.
* to compilation and/or linking errors with MSVC2008. Problem still
* there with MSVC2013. As it can be left unimplemented just fine with
* other compilers, presumably it is never called. So do implement it
* then to avoid the compilation and/or linking errors, but make it
* crash intentionally if called.
*/
void SimpleReferenceObject::operator delete[](void * /* pPtr */)
{
free(NULL);
abort();
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment