View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Lynn McGuire[_2_] Lynn McGuire[_2_] is offline
external usenet poster
 
Posts: 47
Default if I create a BSTR in C++, do I need to release it ?

Yes, you have to.
For example , Microsoft's sample code is doing a same thing.
In http://support.microsoft.com/kb/238393/en-us


Thanks. I was really hoping that the _bstr_t function would
automatically release the BSTR when it's destructor got called
at the end of the block.

Lynn