CStringData::Release

Decrements the reference count of the string data object.

void Release( ) throw( );

Remarks

Call this function to decrement the reference count, freeing the CStringData structure if the reference count hits zero. This is commonly done when a string object is deleted, and therefore no longer needs to reference the string data object.

For example, the following code would call CStringData::Release for the string data object associated with str1:

{
   CString str1 = _T("Hello world");  // Allocates new CStringData
}
// str1 is deleted when it goes out of scope, so it releases its string data   

Requirements

Header: atlsimpstr.h

See Also

Reference

CStringData Class

Other Resources

CStringData Members