Page 1 of 1

Memory/warning issues

Posted: 2012-06-20T10:28:05-07:00
by scraft
Hi,

I have used the VisualMagic workspace generator to create a static multithreaded version of the ImageMagick library (the solution name is VisualStaticMT). I am able to successfully build the library. When I link this library against my projects, I get a couple of warnings along the lines of:

LINK : warning LNK4049: locally defined symbol "_xmlFree" imported (LNK4049: The symbol was both exported from and imported to the program)

To resolve this, I added the following preprocessor define to the CORE_coders project:

LIBXML_STATIC

Secondly, when I run my program via the default memory leak detection provided by Visual Leak Detector http://vld.codeplex.com/ a number of leaks are shown within ImageMagick. In order to resolve this I added the following code to the end of the LocaleComponentTerminus function:

Code: Select all

if ( locale_list )
{
  DestroySplayTree( locale_list );
}
It would be beneficial from my point of view, if the above changes were made in the ImageMagick source code repository, as it would save me making them each time I download a new version. However I appreciate there maybe some disagreements about whether the above fixes are correct or not.

Finally, I am guessing there maybe a better/more official way of submitting a patch of this nature, however I do not have any more time at the moment to spend looking further into these issues. So I thought at the very least I'd post this information to this forum in the hope someone else would be able to carry on where I left off. My apologies for not being able to do more.

Kind regards,

Steve

Re: Memory/warning issues

Posted: 2012-06-20T10:37:01-07:00
by magick
We'll get your patches into the next point release of ImageMagick. Thanks.