Memory Leaks in some functions of MagickWand
Posted: 2009-02-09T02:14:24-07:00
Hi!
I'm using MagickWand to make an application with some text/image effects and I have a problem when I use Valgrind to check memory leaks.
The message that Valgrind shows me is :
246,734 (8,316 direct, 238,418 indirect) bytes in 15 blocks are definitely lost in loss record 36 of 37
==2266== at 0x47BAA25: malloc (vg_replace_malloc.c:207)
==2266== by 0x49C131D: AcquireMagickMemory (memory.c:335)
==2266== by 0x49C1374: AcquireQuantumMemory (memory.c:409)
==2266== by 0x491B1D6: AcquirePixelCacheNexus (cache.c:285)
==2266== by 0x491B009: AcquirePixelCacheInfo (cache.c:228)
==2266== by 0x49AD1A6: AcquireImage (image.c:182)
==2266== by 0x7593B74: ???
==2266== by 0x493FE0C: ReadImage (constitute.c:516)
==2266== by 0x49159EF: BlobToImage (blob.c:354)
==2266== by 0x487949B: MagickReadImageBlob (magick-image.c:7659)
==2266== by 0x80492C8: ImageCrop (in /data/jhub/_prod/server_wwand/temp/WrapWand/wand)
==2266== by 0x804A746: main (in /data/jhub/_prod/server_wwand/temp/WrapWand/wand)
It seems like is in MagickReadImageBlob() function where is the memory leak, my question is: Is necesary to use some function to free memory like MagickRelinquishMemory() or to do some specific action after or before it to avoid this problem? Thank you very much.
Best regards.
I'm using MagickWand to make an application with some text/image effects and I have a problem when I use Valgrind to check memory leaks.
The message that Valgrind shows me is :
246,734 (8,316 direct, 238,418 indirect) bytes in 15 blocks are definitely lost in loss record 36 of 37
==2266== at 0x47BAA25: malloc (vg_replace_malloc.c:207)
==2266== by 0x49C131D: AcquireMagickMemory (memory.c:335)
==2266== by 0x49C1374: AcquireQuantumMemory (memory.c:409)
==2266== by 0x491B1D6: AcquirePixelCacheNexus (cache.c:285)
==2266== by 0x491B009: AcquirePixelCacheInfo (cache.c:228)
==2266== by 0x49AD1A6: AcquireImage (image.c:182)
==2266== by 0x7593B74: ???
==2266== by 0x493FE0C: ReadImage (constitute.c:516)
==2266== by 0x49159EF: BlobToImage (blob.c:354)
==2266== by 0x487949B: MagickReadImageBlob (magick-image.c:7659)
==2266== by 0x80492C8: ImageCrop (in /data/jhub/_prod/server_wwand/temp/WrapWand/wand)
==2266== by 0x804A746: main (in /data/jhub/_prod/server_wwand/temp/WrapWand/wand)
It seems like is in MagickReadImageBlob() function where is the memory leak, my question is: Is necesary to use some function to free memory like MagickRelinquishMemory() or to do some specific action after or before it to avoid this problem? Thank you very much.
Best regards.