[gegl] buffer: Explain why we do gegl_tile_store() in gegl_tile_unref()
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: Explain why we do gegl_tile_store() in gegl_tile_unref()
- Date: Fri, 23 Jul 2010 10:51:22 +0000 (UTC)
commit ec986dd6a6734c9a9eabd6bf67f6e082646f7fe4
Author: Martin Nordholts <martinn src gnome org>
Date: Fri Jul 23 12:56:36 2010 +0200
buffer: Explain why we do gegl_tile_store() in gegl_tile_unref()
gegl/buffer/gegl-tile.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile.c b/gegl/buffer/gegl-tile.c
index f07cf53..cb94933 100644
--- a/gegl/buffer/gegl-tile.c
+++ b/gegl/buffer/gegl-tile.c
@@ -54,6 +54,10 @@ void gegl_tile_unref (GeglTile *tile)
if (!g_atomic_int_dec_and_test (&tile->ref_count))
return;
+ /* In the case of a file store for example, we must make sure that
+ * the in-memory tile is written to disk before we free the memory,
+ * otherwise this data will be lost.
+ */
if (!gegl_tile_is_stored (tile))
gegl_tile_store (tile);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]