Say I have the following:
BSTR myBSTR = SysAllocString( L"MYBSTR" );
CComBSTR myCComBSTR = myBSTR;
Does myCComBSTR take ownership of myBSTR and free it when it goes out of scope? Or does it make a copy of myBSTR and produce a memory leak if i dont free myBSTR?
If this produces a memory leak, what's the most efficient way of handling this? (myBSTR will be passed in to a function as a BSTR and i want to store it as a CComBSTRinternally)