// This may look like C code, but it is really -*- C++ -*-
//
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2004
-// Copyright Dirk Lemstra 2013-2015
+// Copyright Dirk Lemstra 2013-2017
//
// Implementation of Blob
//
#include "Magick++/Include.h"
#include "Magick++/Blob.h"
#include "Magick++/BlobRef.h"
+#include "Magick++/Exception.h"
#include <string.h>
Magick::Blob::~Blob()
{
- if (_blobRef->decrease() == 0)
- delete _blobRef;
+ try
+ {
+ if (_blobRef->decrease() == 0)
+ delete _blobRef;
+ }
+ catch(Magick::Exception)
+ {
+ }
_blobRef=(Magick::BlobRef *) NULL;
}
// This may look like C code, but it is really -*- C++ -*-
//
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002, 2003
-// Copyright Dirk Lemstra 2013-2016
+// Copyright Dirk Lemstra 2013-2017
//
// Implementation of Image
//
Magick::Image::~Image()
{
- if (_imgRef->decrease() == 0)
- delete _imgRef;
+ try
+ {
+ if (_imgRef->decrease() == 0)
+ delete _imgRef;
+ }
+ catch(Magick::Exception)
+ {
+ }
_imgRef=(Magick::ImageRef *) NULL;
}
// This may look like C code, but it is really -*- C++ -*-
//
// Copyright Bob Friesenhahn, 1999, 2000, 2001, 2002
-// Copyright Dirk Lemstra 2014-2015
+// Copyright Dirk Lemstra 2014-2017
//
// Implementation of thread support
//
Magick::MutexLock::~MutexLock(void)
{
#if defined(MAGICKCORE_HAVE_PTHREAD)
- int
- sysError;
-
- if ((sysError=::pthread_mutex_destroy(&_mutex)) == 0)
- return;
- throwExceptionExplicit(MagickCore::OptionError,"mutex destruction failed",
- strerror(sysError));
+ (void) ::pthread_mutex_destroy(&_mutex);
#endif
#if defined(_MT) && defined(_VISUALC_)
- if (::CloseHandle(_mutex) != 0)
- return;
- throwExceptionExplicit(MagickCore::OptionError,"mutex destruction failed");
+ (void) ::CloseHandle(_mutex);
#endif
}