Re: Commit: fix unix build

From: Jordi Mas (jmas_at_softcatala.org)
Date: Sun Jan 11 2004 - 12:23:04 EST

  • Next message: E . A . Zen: "Re: Are we ready for 2.0.3?"

    En/na Dom Lachowicz ha escrit:

    >>You do not want to do that. The string returned by
    >>setlocale is not
    >>guaranteed to live on. The only safe thing to do is
    >>to strdup it.
    >
    >
    > Yeah, but unfortunately all of our setlocale sucks in
    > this regard. I'll fix it up this afternoon.
    >

    Regarding setlocale. I talking from my memory. I do not have the results in
    from of me, then I may not be complete accurate.

    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.

    Thanks,

    -- 
    

    Jordi Mas i Hernāndez (homepage http://www.softcatala.org/~jmas) http://www.softcatala.org



    This archive was generated by hypermail 2.1.4 : Sun Jan 11 2004 - 12:22:56 EST