[cogl] context: Don't forget to unref() the renderer if we create it ourselves
- From: Damien Lespiau <dlespiau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] context: Don't forget to unref() the renderer if we create it ourselves
- Date: Fri, 19 Jul 2013 13:30:17 +0000 (UTC)
commit 5433555f19ac73f3f236026f1bafca758d63c9fa
Author: Damien Lespiau <damien lespiau intel com>
Date: Fri Jul 12 01:05:12 2013 +0100
context: Don't forget to unref() the renderer if we create it ourselves
cogl_display_new() takes a ref on the renderer, so code creating a
renderer and not keeping a pointer to it do unref later needs to drop
the ref immediately.
Reviewed-by: Robert Bragg <robert linux intel com>
cogl/cogl-context.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
index 9b650bb..2a27b0c 100644
--- a/cogl/cogl-context.c
+++ b/cogl/cogl-context.c
@@ -185,6 +185,7 @@ cogl_context_new (CoglDisplay *display,
}
display = cogl_display_new (renderer, NULL);
+ cogl_object_unref(renderer);
}
else
cogl_object_ref (display);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]