2.90.8, ifstream, results of purify.

Nathan Myers ncm@nospam.cantrip.org
Sat Apr 1 00:00:00 GMT 2000


On Wed, Mar 29, 2000 at 01:18:26AM -0800, Benjamin Kosnik wrote:
> I've also looked at, but not resolved, the
> 
> locale::classic() [locale.cc:323]
> 
> issue. Nathan, I'll need your help here, as I'm not quite sure what is
> going on. It looks like locale() calls _S_initialize(), which
> allocates an _Imp, but never cleans it up. It also allocates
> __classic_locale but then doesn't attempt to clean it up. It's late
> and I'm fudging the exact details, but I suspect the locale
> destructors need to be re-worked. Here's a patch I know is wrong, but
> will probably lead you to the real bug a bit faster:

Um, "hell no!".

There's no need to delete the "classic" locale.  There's only one,
it gets built only if it's needed, and then it remains available at 
no cost ever after.

If there's some way to annotate a pointer so that Purify won't bitch
about it, we should do so; or, if there's a section for disposing of
static objects after exit() where we can insert some dead code to
"clean up" before process termination just to satisfy Purify, but that
doesn't actually get run in a real system, then let's do it.  

Let's not damage system performance just to satisfy Purify pedanticism.

Nathan Myers
ncm@nospam.cantrip.org



More information about the Libstdc++ mailing list