aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2016-08-27 23:10:06 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2016-08-27 23:10:06 +0800
commit135e3e6014431a9358a13ce96d0b4870cc916ee3 (patch)
tree7a069ed6f03379479b31a54136d04cb116779044
parente4faaeb768457788a73442e1d2e7216890803da5 (diff)
downloaddexon-bls-135e3e6014431a9358a13ce96d0b4870cc916ee3.tar
dexon-bls-135e3e6014431a9358a13ce96d0b4870cc916ee3.tar.gz
dexon-bls-135e3e6014431a9358a13ce96d0b4870cc916ee3.tar.bz2
dexon-bls-135e3e6014431a9358a13ce96d0b4870cc916ee3.tar.lz
dexon-bls-135e3e6014431a9358a13ce96d0b4870cc916ee3.tar.xz
dexon-bls-135e3e6014431a9358a13ce96d0b4870cc916ee3.tar.zst
dexon-bls-135e3e6014431a9358a13ce96d0b4870cc916ee3.zip
add destructor of Id
-rw-r--r--include/bls.hpp1
-rw-r--r--src/bls.cpp5
2 files changed, 6 insertions, 0 deletions
diff --git a/include/bls.hpp b/include/bls.hpp
index 6ef7edf..4662d72 100644
--- a/include/bls.hpp
+++ b/include/bls.hpp
@@ -61,6 +61,7 @@ class Id {
friend class SecretKey;
public:
Id(unsigned int id = 0);
+ ~Id();
Id(const Id& rhs);
Id& operator=(const Id& rhs);
bool operator==(const Id& rhs) const;
diff --git a/src/bls.cpp b/src/bls.cpp
index dc78c69..c2ae9bf 100644
--- a/src/bls.cpp
+++ b/src/bls.cpp
@@ -211,6 +211,11 @@ Id::Id(unsigned int id)
self_->v = id;
}
+Id::~Id()
+{
+ delete self_;
+}
+
Id::Id(const Id& rhs)
: self_(new impl::Id(*rhs.self_))
{