Memory/warning issues

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
scraft
Posts: 3
Joined: 2012-06-20T10:00:20-07:00
Authentication code: 13

Memory/warning issues

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Memory/warning issues

Post by magick »

We'll get your patches into the next point release of ImageMagick. Thanks.
Post Reply