If you use the pointer returned by GetBufferSetLength to change the string contents, you may need to call ReleaseBuffer before using any other CSimpleStringT member methods. The address returned by GetBufferSetLength may not be valid after the call to ReleaseBuffer because additional CSimpleStringT operations can cause the CSimpleStringT buffer to be reallocated. The buffer is not reassigned if you do not change the length of the CSimpleStringT.
需要ReleaseBuffer GetBuffer不一定需要,只要你不修改缓冲区数据
The address returned by GetBufferSetLength may not be valid after the call to ReleaseBuffer since additional CString operations may cause the CString buffer to be reallocated. http://msdn.microsoft.com/en-us/library/aa300459(v=vs.60).aspx
GetBuffer不一定需要,只要你不修改缓冲区数据