Mercurial > hg > orthanc
changeset 3838:95083d2f6819
fix build on os x
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 15 Apr 2020 17:58:30 +0200 |
parents | 963ea9fab402 |
children | 5bba4d249422 e7003b2203a7 |
files | Core/Images/PamReader.cpp Core/Images/PamReader.h |
diffstat | 2 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/Images/PamReader.cpp Wed Apr 15 17:28:27 2020 +0200 +++ b/Core/Images/PamReader.cpp Wed Apr 15 17:58:30 2020 +0200 @@ -42,6 +42,7 @@ # include "../SystemToolbox.h" #endif +#include <stdlib.h> // For malloc/free #include <boost/algorithm/string/find.hpp> #include <boost/lexical_cast.hpp> @@ -297,4 +298,12 @@ content_.assign(reinterpret_cast<const char*>(buffer), size); ParseContent(); } + + PamReader::~PamReader() + { + if (alignedImageBuffer_ != NULL) + { + free(alignedImageBuffer_); + } + } }
--- a/Core/Images/PamReader.h Wed Apr 15 17:28:27 2020 +0200 +++ b/Core/Images/PamReader.h Wed Apr 15 17:58:30 2020 +0200 @@ -80,11 +80,7 @@ { } - virtual ~PamReader() - { - // freeing NULL is OK - free(alignedImageBuffer_); - } + virtual ~PamReader(); #if ORTHANC_SANDBOXED == 0 void ReadFromFile(const std::string& filename);