c - COM Reference Count -


good day.

what proper way initializing com interface reference count ?

i see many examples, reference count initilialized 1, see examples 0 set.

what diffirence ?

you have set such way when last release() called object takes care of itself. means when create object must have reference count of 1 right before handle object pointer caller asked object. whether initialize reference counter 0 , call addref() (before handle pointer on caller) of initialize 1 , not call addref() you.


Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -