Classes with virtual functions need virtual dtors.

This commit is contained in:
Steve Checkoway
2005-06-19 06:37:28 +00:00
parent c5d1558f0f
commit 4d18c5e4ca
3 changed files with 7 additions and 0 deletions
+2
View File
@@ -331,6 +331,7 @@ public:
class SimpleKeyingInterface
{
public:
virtual ~SimpleKeyingInterface() { }
//! returns smallest valid key length in bytes */
virtual unsigned int MinKeyLength() const =0;
//! returns largest valid key length in bytes */
@@ -632,6 +633,7 @@ class WaitObjectContainer;
class Waitable
{
public:
virtual ~Waitable() { }
//! maximum number of wait objects that this object can return
virtual unsigned int GetMaxWaitObjectCount() const =0;
//! put wait objects into container
+1
View File
@@ -44,6 +44,7 @@ bool VerifyPrime(RandomNumberGenerator &rng, const Integer &p, unsigned int leve
class PrimeSelector
{
public:
virtual ~PrimeSelector() {}
const PrimeSelector *GetSelectorPointer() const {return this;}
virtual bool IsAcceptable(const Integer &candidate) const =0;
};
+4
View File
@@ -109,6 +109,8 @@ public:
template <class TFI, class MEI>
class TF_Base
{
public:
virtual ~TF_Base() {}
protected:
virtual const TrapdoorFunctionBounds & GetTrapdoorFunctionBounds() const =0;
@@ -314,6 +316,7 @@ template <class KEYS>
class PublicKeyCopier
{
public:
virtual ~PublicKeyCopier() {}
virtual void CopyKeyInto(typename KEYS::PublicKey &key) const =0;
};
@@ -322,6 +325,7 @@ template <class KEYS>
class PrivateKeyCopier
{
public:
virtual ~PrivateKeyCopier() {}
virtual void CopyKeyInto(typename KEYS::PublicKey &key) const =0;
virtual void CopyKeyInto(typename KEYS::PrivateKey &key) const =0;
};