Re: cString operator= with same buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 20 November 2005 13:18, Holger Brunn wrote:
> Adding the copy constructor fixes my problem by avoiding it.
> So I made two patches, both with the copy constructor, one also has a check
> for equal buffers in operator= and doesn't free them in this case.

Would you mind to explain how you get two strings pointing to the same buffer 
after the copy ctor is safe (makes a copy instead of taking the buffer)? IMHO 
the copy ctor already takes care that doesn't happen (except if you hand over 
the same buffer to two cStrings with TakePointer = true, which is IMHO not 
intended).

Greetings,
Sascha



[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux