Skip to content

Commit caf476c

Browse files
TylerMSFTTylerMSFT
authored andcommitted
fix #4158
1 parent 2968e89 commit caf476c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

docs/atl-mfc-shared/reference/csimplestringt-class.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -515,11 +515,7 @@ LPTSTR pstr = str.GetBufferSetLength(3);
515515
pstr[0] = _T('C');
516516
pstr[1] = _T('u');
517517
pstr[2] = _T('p');
518-
519-
// No need for trailing zero or call to ReleaseBuffer()
520-
// because GetBufferSetLength() set it for us.
521-
// If we had called GetBuffer() instead of GetBufferSetLength()
522-
// then we would have needed to call ReleaseBuffer().
518+
str.ReleaseBuffer();
523519
524520
str += _T(" soccer is best!");
525521
ASSERT(_tcscmp(str, _T("Cup soccer is best!")) == 0);

0 commit comments

Comments
 (0)