aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/exiv2wrapper.cpp8
-rw-r--r--src/exiv2wrapper.hpp2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/exiv2wrapper.cpp b/src/exiv2wrapper.cpp
index 4412966..de53b94 100644
--- a/src/exiv2wrapper.cpp
+++ b/src/exiv2wrapper.cpp
@@ -572,6 +572,14 @@ ExifTag::ExifTag(const std::string& key, Exiv2::Exifdatum* datum, Exiv2::ExifDat
_sectionDescription = Exiv2::ExifTags::sectionDesc(tag, ifd);
}
+ExifTag::~ExifTag()
+{
+ if (_data == 0)
+ {
+ delete _datum;
+ }
+}
+
void ExifTag::setRawValue(const std::string& value)
{
_datum->setValue(value);
diff --git a/src/exiv2wrapper.hpp b/src/exiv2wrapper.hpp
index 2be1855..29c266b 100644
--- a/src/exiv2wrapper.hpp
+++ b/src/exiv2wrapper.hpp
@@ -42,6 +42,8 @@ public:
// Constructor
ExifTag(const std::string& key, Exiv2::Exifdatum* datum=0, Exiv2::ExifData* data=0);
+ ~ExifTag();
+
void setRawValue(const std::string& value);
const std::string getKey();