[tracker] libtracker-miner: Fix some memory leaks of TrackerTask
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-miner: Fix some memory leaks of TrackerTask
- Date: Mon, 15 Feb 2016 17:04:11 +0000 (UTC)
commit a3d3516f9926233e1391bbd4b30d2a6259808732
Author: Haithem BEN GHORBAL <haithem benghorbal gmail com>
Date: Thu Feb 11 14:03:36 2016 +0100
libtracker-miner: Fix some memory leaks of TrackerTask
These leaks had huge impact as each TrackerTask had a reference
to a GFile, which prevent them to be removed from TrackerFileSystem
when calling tracker_file_system_forget_files(). Due to this behavior,
adding/removing/re-adding folders resulted in some folders/files not
being indexed.
src/libtracker-miner/tracker-miner-fs.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 5428586..b3fa7fc 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1647,6 +1647,7 @@ item_remove (TrackerMinerFS *fs,
G_PRIORITY_DEFAULT,
sparql_buffer_task_finished_cb,
fs);
+ tracker_task_unref (task);
}
g_object_unref (builder);
@@ -1677,6 +1678,7 @@ item_remove (TrackerMinerFS *fs,
G_PRIORITY_DEFAULT,
sparql_buffer_task_finished_cb,
fs);
+ tracker_task_unref (task);
/* SECOND:
* Actually remove all resources. This operation is the one which may take
@@ -1697,6 +1699,7 @@ item_remove (TrackerMinerFS *fs,
G_PRIORITY_DEFAULT,
sparql_buffer_task_finished_cb,
fs);
+ tracker_task_unref (task);
}
if (!tracker_task_pool_limit_reached (TRACKER_TASK_POOL (fs->priv->sparql_buffer))) {
@@ -2020,6 +2023,7 @@ item_move (TrackerMinerFS *fs,
G_PRIORITY_DEFAULT,
sparql_buffer_task_finished_cb,
fs);
+ tracker_task_unref (task);
if (!tracker_task_pool_limit_reached (TRACKER_TASK_POOL (fs->priv->sparql_buffer))) {
item_queue_handlers_set_up (fs);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]