[Xfce4-commits] <terminal:master> Use static array for the property values.
Nick Schermer
noreply at xfce.org
Mon Dec 24 13:38:02 CET 2012
Updating branch refs/heads/master
to d6d2c853a2c7be0057dcc42799a0605f64e59592 (commit)
from e9f29edf2419e34cbe2fd02d20f89e0fead5c185 (commit)
commit d6d2c853a2c7be0057dcc42799a0605f64e59592
Author: Nick Schermer <nick at xfce.org>
Date: Mon Dec 24 13:06:11 2012 +0100
Use static array for the property values.
terminal/terminal-preferences.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/terminal/terminal-preferences.c b/terminal/terminal-preferences.c
index fde810a..dcf2db7 100644
--- a/terminal/terminal-preferences.c
+++ b/terminal/terminal-preferences.c
@@ -98,7 +98,7 @@ struct _TerminalPreferences
{
GObject __parent__;
- GValue *values;
+ GValue values[N_PROPERTIES];
GFile *file;
GFileMonitor *monitor;
@@ -773,9 +773,6 @@ terminal_preferences_class_init (TerminalPreferencesClass *klass)
static void
terminal_preferences_init (TerminalPreferences *preferences)
{
- /* initialize */
- preferences->values = g_new0 (GValue, N_PROPERTIES);
-
/* load settings */
terminal_preferences_load (preferences);
}
@@ -811,7 +808,6 @@ terminal_preferences_finalize (GObject *object)
for (n = 1; n < N_PROPERTIES; ++n)
if (G_IS_VALUE (preferences->values + n))
g_value_unset (preferences->values + n);
- g_free (preferences->values);
(*G_OBJECT_CLASS (terminal_preferences_parent_class)->finalize) (object);
}
More information about the Xfce4-commits
mailing list