c++ - Need to Release a com_ptr_t before reassigning with CreateInstance? -


In a C ++ class with _com_ptr_t members, memory leakage if CreateInstance () is repeatedly used to get a fresh example on the same pointer,

The release of COM objects (without performing)? It is well documented that the referee calculation decreases when one of these smart points out of the points, and it is not when the encased pointer is detach () ad. MSDN does not refer to the reed calculation implications, when repeating StructureInstine ().

No leak will be _com_ptr_t call release () from CreateInstance () can be in the beginning, which you can easily verify by reading _com_ptr_t implementation.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

c# - Confused over DLL entry points (entry point not found exception) -