Re: Thread safe STL for VC6.0
Faisal <faisalm83@gmail.com> wrote in news:6a45541a-81b0-4666-8563-
b6ea233efb09@q27g2000prf.googlegroups.com:
On Jun 3, 1:35 pm, Ismo Salonen <Ismo.Salo...@codeit.fi> wrote:
--snip--
Reading a little bit more tells how to really fix this issue:
Another way is to disable reference-counting altogether, making string
operations thread safe. Simply change the value of _FROZEN to zero:
enum _Mref {_FROZEN = 255}; // set to zero to disable sharing
br
ismo
I resolved my problem by changing _FROZEN to zero. By making the
_FROZEN to zero I'm disabling the memory sharing mechanism of string.
right?. So my application would take more size with this workaround.
In Microsoft site, they suggest to move to VC7.0 or later for
completely resolving this issue. In VC7.0 and later whether Microsoft
fixed this issue by disabling the memory sharing or providing some
thread safe reference counting?
I would like to know If I switch to VC7.0 or later, will my
application work with lesser memory( by memory sharing mechanism )? If
It wont, I can go with VC6.0 work around.
If I remember right, they don't do reference counted strings (shared), but
they do have the short string optimization. So, what that generally means
is that if you have a lot of short strings (under 16 characters) you will
probably use less memory, but if your strings are longer then you may use
more. You will have to try it and measure to be sure.
joe