summaryrefslogtreecommitdiffstats
path: root/libdimension/canvas.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-05-28 18:16:04 -0600
committerTavian Barnes <tavianator@gmail.com>2011-05-28 18:16:04 -0600
commit4479d25609e26253c4e5fcfc78b093c0b45cefb8 (patch)
tree4f931d4d1d78e4915f99134e563a9d14faba7a33 /libdimension/canvas.c
parentefd3c1c2b42ffda0c8f7e5cd9b03fba07eead1ea (diff)
downloaddimension-4479d25609e26253c4e5fcfc78b093c0b45cefb8.tar.xz
Don't allocate reference counts on the heap.
Diffstat (limited to 'libdimension/canvas.c')
-rw-r--r--libdimension/canvas.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libdimension/canvas.c b/libdimension/canvas.c
index b1b65e1..6df5dd3 100644
--- a/libdimension/canvas.c
+++ b/libdimension/canvas.c
@@ -36,7 +36,7 @@ dmnsn_new_canvas(size_t width, size_t height)
canvas->height = height;
canvas->optimizers = dmnsn_new_array(sizeof(dmnsn_canvas_optimizer));
canvas->pixels = dmnsn_malloc(sizeof(dmnsn_color)*width*height);
- canvas->refcount = dmnsn_new_refcount();
+ canvas->refcount = 0;
return canvas;
}
@@ -46,8 +46,6 @@ void
dmnsn_delete_canvas(dmnsn_canvas *canvas)
{
if (canvas && DMNSN_DECREF(canvas)) {
- dmnsn_delete_refcount(canvas->refcount);
-
/* Free the optimizers */
DMNSN_ARRAY_FOREACH (dmnsn_canvas_optimizer *, i, canvas->optimizers) {
if (i->free_fn) {