### ImageMagick version

7.1.1-2

### Operating system

Linux

### Operating system, version and so on

Arch Linux

### Description

I'm getting memory leaks in recent ImageMagick versions, since version 7.1.1.0. This was not happening before the mentioned version.

### Steps to Reproduce

Create `imleak.cpp` file with:
```C++
#include <Magick++.h>

int main() {
	std::vector<Magick::Drawable> imageSettings;
	Magick::Image img1(Magick::Geometry(1280, 160), Magick::Color("blue"));
	Magick::Image img2(Magick::Geometry(1280, 160), Magick::Color("red"));
	Magick::Image finalImage(img1);
	
	imageSettings.emplace_back(Magick::DrawableGravity(Magick::GravityType::CenterGravity));
	img1.draw(imageSettings);
	finalImage.composite(img2, 0, 0, Magick::CompositeOperator::CopyAlphaCompositeOp);
	
	return 0;
}
```

Compile with address sanitizer and run:
```
$ g++ -fsanitize=address -g -Wall -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=1 -I/usr/include/ImageMagick-7 -o imleak imleak.cpp -lMagick++-7.Q16HDRI -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI
$ ./imleak 

=================================================================
==20252==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 39072 byte(s) in 3 object(s) allocated from:
    #0 0x7f5cb7abfa89 in __interceptor_malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f5cb752011f in AcquireCriticalMemory MagickCore/memory.c:634

Indirect leak of 4104 byte(s) in 1 object(s) allocated from:
    #0 0x7f5cb7abfa89 in __interceptor_malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f5cb75c226c in AcquireString MagickCore/string.c:108

SUMMARY: AddressSanitizer: 43176 byte(s) leaked in 4 allocation(s).
```


### Images

No images needed.
Memory leaks in recent versions
This is a GitHub Issue
repo:ImageMagick
owner:ImageMagick
Title : Memory leaks in recent versions
Issue date:

--- start body ---
### ImageMagick version

7.1.1-2

### Operating system

Linux

### Operating system, version and so on

Arch Linux

### Description

I'm getting memory leaks in recent ImageMagick versions, since version 7.1.1.0. This was not happening before the mentioned version.

### Steps to Reproduce

Create `imleak.cpp` file with:
```C++
#include <Magick++.h>

int main() {
	std::vector<Magick::Drawable> imageSettings;
	Magick::Image img1(Magick::Geometry(1280, 160), Magick::Color("blue"));
	Magick::Image img2(Magick::Geometry(1280, 160), Magick::Color("red"));
	Magick::Image finalImage(img1);
	
	imageSettings.emplace_back(Magick::DrawableGravity(Magick::GravityType::CenterGravity));
	img1.draw(imageSettings);
	finalImage.composite(img2, 0, 0, Magick::CompositeOperator::CopyAlphaCompositeOp);
	
	return 0;
}
```

Compile with address sanitizer and run:
```
$ g++ -fsanitize=address -g -Wall -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=1 -I/usr/include/ImageMagick-7 -o imleak imleak.cpp -lMagick++-7.Q16HDRI -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI
$ ./imleak 

=================================================================
==20252==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 39072 byte(s) in 3 object(s) allocated from:
    #0 0x7f5cb7abfa89 in __interceptor_malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f5cb752011f in AcquireCriticalMemory MagickCore/memory.c:634

Indirect leak of 4104 byte(s) in 1 object(s) allocated from:
    #0 0x7f5cb7abfa89 in __interceptor_malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f5cb75c226c in AcquireString MagickCore/string.c:108

SUMMARY: AddressSanitizer: 43176 byte(s) leaked in 4 allocation(s).
```


### Images

No images needed.
--- end body ---
