Ethereal-dev: Re: [Ethereal-dev] Don't release: Console warnings with latest changes in prefs.

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Gerald Combs <gerald@xxxxxxxxxxxx>
Date: Tue, 21 Jun 2005 17:02:22 -0500
Ulf Lamping wrote:

> Is there a special idea behind using the GStrings static? Seems a bit
> strange to me...
> 
> Two reasons against:
> 
> a) not multithread safe (should be currently no problem)
> b) will keep using memory, but this function is used only at startup
> 
> Why not allocate the strings at function start and simply free them near
> the end of the function?

The GStrings are static because the gchar pointers they replaced were
static.  I was trying to drop them in with as few changes as possible.
Allocating and freeing them each time makes more sense, so I've checked
in a change to do just that.