diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2000-12-23 13:17:32 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2000-12-23 13:17:32 (GMT) |
commit | d24bacb8a47f945e6919f067e8057ad30012bd5a (patch) | |
tree | 2844b08018435b9d33f68ef4b787d5434db66d5a /c++/src/H5AtomType.h | |
parent | 45c5dd949f7dd4549dc5996ff8395652ef3d9dda (diff) | |
download | hdf5-d24bacb8a47f945e6919f067e8057ad30012bd5a.zip hdf5-d24bacb8a47f945e6919f067e8057ad30012bd5a.tar.gz hdf5-d24bacb8a47f945e6919f067e8057ad30012bd5a.tar.bz2 |
[svn-r3199]
Purpose: bug fix
Description:
I found a couple of places where virtual destructors were missing
and could cause small memory leaks. Also, some destructors were
not virtual when they should be.
Solution:
- added virtual destructors, which also free dynamically allocated
memory
- added virtual to several destructors
- also, fixed several typos
Platforms tested:
Solaris 2.7 (arabica)
Diffstat (limited to 'c++/src/H5AtomType.h')
-rw-r--r-- | c++/src/H5AtomType.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/c++/src/H5AtomType.h b/c++/src/H5AtomType.h index 14834c3..bd8467c 100644 --- a/c++/src/H5AtomType.h +++ b/c++/src/H5AtomType.h @@ -1,3 +1,8 @@ +// Class AtomType is a base class, from which IntType, FloatType, StrType, +// and PredType inherit. It provides the services that are common to these +// subclasses. It also inherits from DataType and passes down the +// services that are common to all the datatypes. + #ifndef _H5AtomType_H #define _H5AtomType_H @@ -6,9 +11,6 @@ namespace H5 { #endif class AtomType : public DataType { public: - // Copy constructor - makes copy of the original object - AtomType( const AtomType& original ); - // Sets the total size for an atomic datatype. void setSize( size_t size ) const; @@ -38,13 +40,17 @@ class AtomType : public DataType { // Sets the least and most-significant bits padding types // void setPad( H5T_pad_t lsb, H5T_pad_t msb ) const; + // Copy constructor - makes copy of the original object + AtomType( const AtomType& original ); + + // Default destructor virtual ~AtomType(); protected: // Default constructor AtomType(); - // Constructor that takes an existing id - for predefined type + // Constructor that takes an existing id AtomType( const hid_t existing_id ); }; #ifndef H5_NO_NAMESPACE |