|
-
December 8th, 2003, 06:03 AM
#1
COM: release-function
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|