CStringData::Release

递减字符串数据对象的引用计数。

void Release( ) throw( );

备注

调用此函数递减引用计数,释放 CStringData 结构,如果引用计数命中零。 这通常,当字符串对象被删除,而不再需要引用字符串数据对象。

例如,下面的代码将调用字符串数据对象的 CStringData::Release 与 str1:

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

要求

Header: atlsimpstr.h

请参见

参考

CStringData选件类