Re: Memory leaks in Magick++ ???

Bob Friesenhahn <[email protected]> Wed, 4 Mar 2020 13:20:19 -0600 (CST)
Newsgroups gmane.comp.video.graphicsmagick.apis
Message-ID <[email protected]>
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--3735943886-1870231840-1583349619=:2854
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8BIT

On Wed, 4 Mar 2020, 10bxjfhf wrote:
>
> In the current project, the leak mentioned is the only one it complains about 
> and the curious thing about it is that it does not matter how often the 
> function is run, which leads me to believe it is allocated  somewhere  in the 
> initialization code, but I have not been able to track it down

This is possible.  When using Magick++ there is a static destructor 
which gets executed after main() returns.  Some memory leak checkers 
assume that all memory should be released before main() returns, but 
destructors for statically constructed objects execute after main() 
returns.

See the MagickCleanUp implementation at the end of 
Magick++/lib/Image.cpp.

Bob
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
Public Key,     http://www.simplesystems.org/users/bfriesen/public-key.txt
--3735943886-1870231840-1583349619=:2854
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--3735943886-1870231840-1583349619=:2854
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Graphicsmagick-apis mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-apis

--3735943886-1870231840-1583349619=:2854--