Free GlyphData buffer 79/275979/1
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 8 Jun 2022 04:55:40 +0000 (13:55 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 8 Jun 2022 04:55:40 +0000 (13:55 +0900)
We make GlyphData's buffer as malloc.
So, we need to change the release method as free.

Change-Id: Id3c1b7ed9f6b8683b05440edc1c6f52fca5fb6c1
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-toolkit/internal/text/rendering/atlas/text-atlas-renderer.cpp
dali-toolkit/internal/text/rendering/text-typesetter.cpp

index e30564e..d408450 100644 (file)
@@ -221,7 +221,7 @@ struct AtlasRenderer::Impl
                                 glyphBufferData.width,
                                 glyphBufferData.height,
                                 glyphBufferData.format,
-                                PixelData::DELETE_ARRAY);
+                                PixelData::FREE);
 
         if(bitmap)
         {
index 2689ffb..da397ac 100644 (file)
@@ -1307,8 +1307,8 @@ Devel::PixelBuffer Typesetter::CreateImageBuffer(const uint32_t& bufferWidth, co
           glyphData.verticalOffset += glyphData.glyphBitmap.outlineOffsetY;
         }
 
-        // delete the glyphBitmap.buffer as it is now copied into glyphData.bitmapBuffer
-        delete[] glyphData.glyphBitmap.buffer;
+        // free the glyphBitmap.buffer as it is now copied into glyphData.bitmapBuffer
+        free(glyphData.glyphBitmap.buffer);
         glyphData.glyphBitmap.buffer = NULL;
       }