The (void) explicitly discards the returned pointer from the call to new, makes it obvious you intended to discard the return value, and avoids a warning from compilers that issue one when you ignore a return. OTOH, if it weren't for QObject's memory management this construct would create a memory leak.




Reply With Quote
Bookmarks