wxString counting thread-safe?

Armel Asselin asselin.armel at wanadoo.fr
Tue Aug 8 07:27:46 PDT 2006


Hello,

I'm in front of a problem with wxString. It seems that its reference 
counting is not thread-safe (that of wxObject is not as well).
It could be done very easily on Win32 and GLib based.

the idea behind this is not to make objects thread-safe themselves but their 
_value_ would be.
currently trying to simply _use_ a wxString copy from another thread than 
the main thread will randomly crash the app.

if we we want to do that, we probably want to add a wxInterlockedIncrement / 
wxInterlockedDecrement, where would i add that?

Regards
Armel Asselin
----------------------------------------------------
http://www.elliecomputing.com
ECMerge - comparison and merge tool





More information about the wx-dev mailing list