gimp r26265 - in branches/soc-2008-tagging: . app/core
- From: aurisj svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26265 - in branches/soc-2008-tagging: . app/core
- Date: Mon, 21 Jul 2008 20:40:40 +0000 (UTC)
Author: aurisj
Date: Mon Jul 21 20:40:39 2008
New Revision: 26265
URL: http://svn.gnome.org/viewvc/gimp?rev=26265&view=rev
Log:
2008-07-21 Aurimas JuÅka <aurisj svn gnome org>
* app/core/gimptagcache.c (gimp_tag_cache_finalize),
(gimp_tag_cache_get_memsize): some fixes to finalization and memsize
calculations.
Modified:
branches/soc-2008-tagging/ChangeLog
branches/soc-2008-tagging/app/core/gimptagcache.c
Modified: branches/soc-2008-tagging/app/core/gimptagcache.c
==============================================================================
--- branches/soc-2008-tagging/app/core/gimptagcache.c (original)
+++ branches/soc-2008-tagging/app/core/gimptagcache.c Mon Jul 21 20:40:39 2008
@@ -37,6 +37,7 @@
#include "gimpdata.h"
#include "gimptagcache.h"
#include "gimplist.h"
+#include "gimp-utils.h"
#include "gimp-intl.h"
@@ -62,7 +63,7 @@
GimpTagged *tagged,
GimpTagCache *cache);
-static void gimp_tag_cache_load_start_element(GMarkupParseContext *context,
+static void gimp_tag_cache_load_start_element (GMarkupParseContext *context,
const gchar *element_name,
const gchar **attribute_names,
const gchar **attribute_values,
@@ -131,6 +132,12 @@
cache->records = NULL;
}
+ if (cache->containers)
+ {
+ g_list_free (cache->containers);
+ cache->containers = NULL;
+ }
+
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -138,8 +145,11 @@
gimp_tag_cache_get_memsize (GimpObject *object,
gint64 *gui_size)
{
- /*GimpTagCache *cache = GIMP_TAG_CACHE (object);*/
- gint64 memsize = 0;
+ GimpTagCache *cache = GIMP_TAG_CACHE (object);
+ gint64 memsize = 0;
+
+ memsize += gimp_g_list_get_memsize (cache->containers, 0);
+ memsize += cache->records->len * sizeof (GimpTagCacheRecord);
return memsize + GIMP_OBJECT_CLASS (parent_class)->get_memsize (object,
gui_size);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]