[vdr] Re: cString operator= with same buffer
Sascha Volkenandt
lists at magoa.net
Sun Nov 20 21:32:20 CET 2005
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
More information about the vdr
mailing list