CString::ReleaseBuffer

Call this member function to release a buffer allocated by GetBuffer. If you know that the string in the buffer is null-terminated, you can omit the nNewLength argument. If your string is not null-terminated, then use nNewLength to specify its length. The address returned by GetBuffer is invalid after the call to ReleaseBuffer or any other CString operation.

Syntax

void ReleaseBuffer( int nNewLength = –1 );

At a Glance

Header File Afx.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

See Also

CString Overview, CString Member Functions, Simple Value Types, CString::GetBuffer