On quarta-feira, 3 de outubro de 2012 15.50.30, Alex Malyushytskyy wrote: > > That's not so good; Q_CHECK_PTR will print "Out of memory" upon seeing a > > Q_ASSERT just prints an assert information in debug
Not really. Q_ASSERT, if it fails, calls qt_assert, which will abort the application with a core dump (SIGABRT) or, on Windows, call the debugger routines indicating failure. Q_ASSERTs are not survivable. If you trip one, the application terminates. > Q_CHECK_PTR terminates execution if you can't process, > and this is the case, cause this pointer had to be initialized before > the function is called. Q_CHECK_PTR only checks for null. It can't tell an invalid pointer from a valid one. > Code can't recover from it. This should not happen, Stop is the best you can > do. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest