[gnome-builder/wip/highlight] highlight: add tracing to index finalizer
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/highlight] highlight: add tracing to index finalizer
- Date: Fri, 27 Mar 2015 00:36:28 +0000 (UTC)
commit 25d3728f99a82b7227e01684ecdefd33974f2ac3
Author: Christian Hergert <christian hergert me>
Date: Thu Mar 26 17:36:18 2015 -0700
highlight: add tracing to index finalizer
libide/ide-highlight-index.c | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/libide/ide-highlight-index.c b/libide/ide-highlight-index.c
index 0d9d81b..b7f7ff3 100644
--- a/libide/ide-highlight-index.c
+++ b/libide/ide-highlight-index.c
@@ -16,9 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#define G_LOG_DOMAIN "ide-highlight-index"
+
#include <string.h>
#include <sys/user.h>
+#include "ide-debug.h"
#include "ide-highlight-index.h"
G_DEFINE_BOXED_TYPE (IdeHighlightIndex, ide_highlight_index,
@@ -103,6 +106,18 @@ ide_highlight_index_ref (IdeHighlightIndex *self)
return self;
}
+static void
+ide_highlight_index_finalize (IdeHighlightIndex *self)
+{
+ IDE_ENTRY;
+
+ g_string_chunk_free (self->strings);
+ g_hash_table_unref (self->index);
+ g_free (self);
+
+ IDE_EXIT;
+}
+
void
ide_highlight_index_unref (IdeHighlightIndex *self)
{
@@ -110,11 +125,7 @@ ide_highlight_index_unref (IdeHighlightIndex *self)
g_assert_cmpint (self->ref_count, >, 0);
if (g_atomic_int_dec_and_test (&self->ref_count))
- {
- g_string_chunk_free (self->strings);
- g_hash_table_unref (self->index);
- g_free (self);
- }
+ ide_highlight_index_finalize (self);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]