[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Beaver-devel] Memory leaks
From: |
Michael Terry |
Subject: |
[Beaver-devel] Memory leaks |
Date: |
Sat, 07 Jun 2003 12:41:25 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030322 |
One quick thing:
I've noticed in a couple of your checkins that you use code like:
str_replace_str (&conf_val, g_get_home_dir(), "~");
or
gtk_window_set_title (GTK_WINDOW(MainWindow),
g_strconcat(
FPROPS(CurrentPage, BaseName), ...
I also notice that a lot of the current codebase has this method too,
from the old maintainers. I've tried to change it where I can, but we
shouldn't perpetuate it.
The problem, of course, is that you don't save a pointer to the freshly
g_malloc'ed strings you use. For example, the first line up there
should be:
gchar *home = g_get_home_dir ();
str_replace_str (&conf_val, home, "~");
g_free (home);
-mt
pgpwko6LYsnpK.pgp
Description: PGP signature
- [Beaver-devel] Memory leaks,
Michael Terry <=