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

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

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