io icon indicating copy to clipboard operation
io copied to clipboard

String.clone is unsafe

Open schveiguy opened this issue 4 years ago • 3 comments

Current implementation of String.clone does not duplicate the string, it simply sets a new reference. If the original string is freed or reallocated, the new clone is now dangling.

schveiguy avatar May 01 '20 00:05 schveiguy