From: Dom Lachowicz (domlachowicz_at_yahoo.com)
Date: Sun Jan 11 2004 - 13:25:48 EST
> The profile that use under Windows NT reports that
> we leak like the Titanic in
> setlocale calls. It seems that setlocale allocates
> the string that returns and
> it has to be free'd in some situations. I have not
> found this in the setlocale
> documentation and I have not investaged this any
> deeper. We use setlocale
> continually when doing the dimension conversion at
> ut_units.cpp.
From the setlocale documentation:
BUGS
The return type ought to be const char *, but
is char * to avoid warn‐
ings in C code predating ANSI C.
If MSFT requires this to be free()'d then they're in
the wrong. Fortunately, I've written a
UT_LocaleTransactor class that I'll make all of our
code use. If we need to do something like free() the
returned strings for MSFT, we can fix it in one place.
Best regards,
Dom
__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus
This archive was generated by hypermail 2.1.4 : Sun Jan 11 2004 - 13:25:40 EST