Hello everybody!

I've just tried to do my first steps under COM and by doing that I've also read about the release()-function! And following this there was some sample-code in my book:

DWORD CSpaceship::XMotion::Release()
{
METHOD_PROLOGUE(CSpaceship,Motion)
if (pThis->m_dwRef == 0)
return 0;
if (-pThis->m_dwRef == 0) {
delete pThis;
return 0;
}

return pthis->m_dwRef;
}


And I didn't understand the second if-construct with the minus in front of the pThis!
Can anyone tell, what this minus in this case does and whats the difference between the two if-constructs?

Thanks for helping me!

Bye, Zechasso