Rules for Freeing BSTRs in OLE AutomationLast reviewed: May 17, 1995Article ID: Q108934 |
The information in this article applies to:
SUMMARYThe callee frees a BSTR passed in as a by-reference parameter before assigning the parameter a new value. In all other cases, the caller frees the BSTR.
MORE INFORMATIONOLE Automation defines the BSTR data type to handle strings that are allocated by one component and freed by another. The rule for freeing a BSTR is as follows: The callee frees a BSTR passed in as a by-reference parameter before assigning the parameter a new value. In all other cases, the caller frees the BSTR. In other words, the caller handles BSTRs as follows:
|
Additional reference words: 2.01 3.50 4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |