aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2002-08-21 03:34:28 +0800
committerPeter Williams <peterw@src.gnome.org>2002-08-21 03:34:28 +0800
commit6f7a4cc27d69c8cb23045999e649841d2172d06a (patch)
tree9437f48765a5333cf2e22150d6ec418af638ce47 /camel
parent2be7ab21f64752eda4cc6558bd9116d5d1a58474 (diff)
downloadgsoc2013-evolution-6f7a4cc27d69c8cb23045999e649841d2172d06a.tar
gsoc2013-evolution-6f7a4cc27d69c8cb23045999e649841d2172d06a.tar.gz
gsoc2013-evolution-6f7a4cc27d69c8cb23045999e649841d2172d06a.tar.bz2
gsoc2013-evolution-6f7a4cc27d69c8cb23045999e649841d2172d06a.tar.lz
gsoc2013-evolution-6f7a4cc27d69c8cb23045999e649841d2172d06a.tar.xz
gsoc2013-evolution-6f7a4cc27d69c8cb23045999e649841d2172d06a.tar.zst
gsoc2013-evolution-6f7a4cc27d69c8cb23045999e649841d2172d06a.zip
Plug some large leaks in the indexing code.
2002-08-19 Peter Williams <peterw@ximian.com> Plug some large leaks in the indexing code. * camel-mime-filter-index.c (camel_mime_filter_index_set_index): Unref the old index if necessary. * camel-text-index.c (camel_text_index_get_type): Give it the correct parent type so that finalize handlers chain. (camel_text_index_name_get_type): Here too. (camel_text_index_cursor_get_type): Here too. (camel_text_index_key_cursor_get_type): Here too. svn path=/trunk/; revision=17820
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog13
-rw-r--r--camel/camel-mime-filter-index.c1
-rw-r--r--camel/camel-text-index.c8
3 files changed, 18 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 040b2ab638..23ae418cbe 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,16 @@
+2002-08-19 Peter Williams <peterw@ximian.com>
+
+ Plug some large leaks in the indexing code.
+
+ * camel-mime-filter-index.c (camel_mime_filter_index_set_index): Unref
+ the old index if necessary.
+
+ * camel-text-index.c (camel_text_index_get_type): Give it the correct
+ parent type so that finalize handlers chain.
+ (camel_text_index_name_get_type): Here too.
+ (camel_text_index_cursor_get_type): Here too.
+ (camel_text_index_key_cursor_get_type): Here too.
+
2002-08-20 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-store.c (get_folders): Don't let the
diff --git a/camel/camel-mime-filter-index.c b/camel/camel-mime-filter-index.c
index e9df08072b..6648abf860 100644
--- a/camel/camel-mime-filter-index.c
+++ b/camel/camel-mime-filter-index.c
@@ -145,6 +145,7 @@ void camel_mime_filter_index_set_index (CamelMimeFilterIndex *mf, CamelIndex *in
size_t outlen, outspace;
camel_mime_filter_complete((CamelMimeFilter *)mf, "", 0, 0, &out, &outlen, &outspace);
+ camel_object_unref ((CamelObject *)index);
}
mf->index = index;
diff --git a/camel/camel-text-index.c b/camel/camel-text-index.c
index 8a5ab05bf6..046c5a98de 100644
--- a/camel/camel-text-index.c
+++ b/camel/camel-text-index.c
@@ -784,7 +784,7 @@ camel_text_index_get_type(void)
static CamelType type = CAMEL_INVALID_TYPE;
if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_object_get_type(), "CamelTextIndex",
+ type = camel_type_register(camel_index_get_type(), "CamelTextIndex",
sizeof (CamelTextIndex),
sizeof (CamelTextIndexClass),
(CamelObjectClassInitFunc) camel_text_index_class_init,
@@ -1504,7 +1504,7 @@ camel_text_index_name_get_type(void)
static CamelType type = CAMEL_INVALID_TYPE;
if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_object_get_type(), "CamelTextIndexName",
+ type = camel_type_register(camel_index_name_get_type(), "CamelTextIndexName",
sizeof (CamelTextIndexName),
sizeof (CamelTextIndexNameClass),
(CamelObjectClassInitFunc) camel_text_index_name_class_init,
@@ -1620,7 +1620,7 @@ camel_text_index_cursor_get_type(void)
static CamelType type = CAMEL_INVALID_TYPE;
if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_object_get_type(), "CamelTextIndexCursor",
+ type = camel_type_register(camel_index_cursor_get_type(), "CamelTextIndexCursor",
sizeof (CamelTextIndexCursor),
sizeof (CamelTextIndexCursorClass),
(CamelObjectClassInitFunc) camel_text_index_cursor_class_init,
@@ -1732,7 +1732,7 @@ camel_text_index_key_cursor_get_type(void)
static CamelType type = CAMEL_INVALID_TYPE;
if (type == CAMEL_INVALID_TYPE) {
- type = camel_type_register(camel_object_get_type(), "CamelTextIndexKeyCursor",
+ type = camel_type_register(camel_index_cursor_get_type(), "CamelTextIndexKeyCursor",
sizeof (CamelTextIndexKeyCursor),
sizeof (CamelTextIndexKeyCursorClass),
(CamelObjectClassInitFunc) camel_text_index_key_cursor_class_init,