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