Re: Finally have cleared the leaks ...

Bob Friesenhahn <[email protected]> Fri, 13 Mar 2020 08:18:03 -0500 (CDT)
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.

---559023410-114810432-1584105483=:19783
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8BIT

On Thu, 12 Mar 2020, 10bxjfhf wrote:

> After getting sidetracked by a couple other, unrelated issues, I was finally 
> able to get back to my GM  code.
>
> Once back at it, I ended up a severe crash on exit from the app. A bit of 
> testing confirmed it to be GM & Magick++ related.
>
> After some Googling, I realized that had not called DestroyMagick();

It is always necessary to call DestroyMagick() in order to assure 
resources (including those used by logging) are freed. :-)

In Magick++, DestroyMagick() will be automatically called, but it will 
be after main() returns, which is very late given that it is possible 
that the user might have already freed referenced data.

> Why it never game any issues before I have no clue, but since I have added 
> this call, as well as a call to cleanup MagickLib::SetLogMethod( NULL ); all 
> is well and even the leak I mentioned some time ago is cleared  up. :-)

I have started working on improving the log code so that it is 
possible to control it programatically and log.mgk would not be 
required.  There will be APIs provided in order to set default values 
which are then used when InitializeMagick() is called.

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
---559023410-114810432-1584105483=:19783
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


---559023410-114810432-1584105483=:19783
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

---559023410-114810432-1584105483=:19783--