Reputation: 4941
I'm using ColorPacket *GetImageHistogram(const Image *image, ...)
to extract an histogram. I see IM sources and found, that GetImageHistogram allocates memory via:
histogram=(ColorPacket *) AcquireQuantumMemory((size_t) cube_info->colors,
sizeof(*histogram));
How should I free this memory?
Upvotes: 0
Views: 2966
Reputation: 33618
To free memory allocated with AcquireQuantumMemory
, use RelinquishMagickMemory
:
histogram = RelinquishMagickMemory(histogram);
See the API documentation. This function always returns NULL
.
Upvotes: 1