[wx-dev] Removing string ref counting (was Re: wxString threadsafe)

Vadim Zeitlin vadim at wxwidgets.org
Mon May 5 09:04:14 PDT 2008


On Sun, 04 May 2008 21:52:50 +0200 Robert Roebling wrote:

RR> > Yes, so I guess we should replace our wxString implementation with a
RR> > non-reference counted version using small string optimization (this is
RR> > what all modern STL implementations use AFAIK).
RR> 
RR> Now the simple question: who can do that?

 FWIW I thought about something else: what if we used (by default)
std::string-based wxStringImpl, even in !wxUSE_STL mode? Vaclav, would this
be [as] simple [as I hope] to do?

RR> Needless to say that the two authors of the current implementation of
RR> wxString would surely qualify best for doing the above change :-)

 Funny you should say this, I thought about it too but decided to keep this
for myself :-/ Anyhow, it shouldn't be too difficult to change wxStringImpl
to not use reference-counted so if the plan above is unacceptable for some
reason I'll try to do this. We probably shouldn't delay 2.9.0 until this
though, I'd really like to release it some time soon.

 Regards,
VZ



More information about the wx-dev mailing list