diff --git a/cogl/cogl/cogl-framebuffer.c b/cogl/cogl/cogl-framebuffer.c index 6f24b2e42..d8ffbcd1c 100644 --- a/cogl/cogl/cogl-framebuffer.c +++ b/cogl/cogl/cogl-framebuffer.c @@ -346,7 +346,7 @@ cogl_framebuffer_dispose (GObject *object) g_clear_pointer (&priv->clip_stack, _cogl_clip_stack_unref); cogl_clear_object (&priv->modelview_stack); cogl_clear_object (&priv->projection_stack); - cogl_clear_object (&priv->journal); + g_clear_pointer (&priv->journal, _cogl_journal_free); ctx->framebuffers = g_list_remove (ctx->framebuffers, framebuffer); diff --git a/cogl/cogl/cogl-journal-private.h b/cogl/cogl/cogl-journal-private.h index d38c3df1a..21214a6d0 100644 --- a/cogl/cogl/cogl-journal-private.h +++ b/cogl/cogl/cogl-journal-private.h @@ -40,8 +40,6 @@ typedef struct _CoglJournal { - CoglObject _parent; - /* A pointer the framebuffer that is using this journal. This is only valid when the journal is not empty. It *does* take a reference on the framebuffer. Although this creates a circular @@ -88,6 +86,9 @@ typedef struct _CoglJournalEntry CoglJournal * _cogl_journal_new (CoglFramebuffer *framebuffer); +void +_cogl_journal_free (CoglJournal *journal); + void _cogl_journal_log_quad (CoglJournal *journal, const float *position, diff --git a/cogl/cogl/cogl-journal.c b/cogl/cogl/cogl-journal.c index 26edb4ebf..4ed508a7f 100644 --- a/cogl/cogl/cogl-journal.c +++ b/cogl/cogl/cogl-journal.c @@ -122,11 +122,7 @@ typedef void (*CoglJournalBatchCallback) (CoglJournalEntry *start, typedef gboolean (*CoglJournalBatchTest) (CoglJournalEntry *entry0, CoglJournalEntry *entry1); -static void _cogl_journal_free (CoglJournal *journal); - -COGL_OBJECT_INTERNAL_DEFINE (Journal, journal); - -static void +void _cogl_journal_free (CoglJournal *journal) { int i; @@ -154,7 +150,7 @@ _cogl_journal_new (CoglFramebuffer *framebuffer) _cogl_list_init (&journal->pending_fences); - return _cogl_journal_object_new (journal); + return journal; } static void