Copy-on-Write | Example
Hi Refer code below: https://code.sololearn.com/cRlz0Kh7KmpM I am just copying a to b and still it allocates memory on heap. Is COW means I should not see allocation on heap for b string until I do not modify it. Is it right? But Since C++ string does not support COW, it allocates memory up front only. Can i see COW behavior on any of the default C++ or I have to implement only ? Thanks in advance..!