From: Markus Scherer Date: Tue, 26 Jul 2011 05:32:25 +0000 (+0000) Subject: ICU-8454 virtual destructors should be explicit, and defined in a .cpp file, so that... X-Git-Tag: milestone-59-0-1~4622 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=28622964718c9c4ee0977ab309e895219889cd77;p=icu ICU-8454 virtual destructors should be explicit, and defined in a .cpp file, so that they can serve as key functions X-SVN-Rev: 30423 --- diff --git a/icu4c/source/common/appendable.cpp b/icu4c/source/common/appendable.cpp index 678634281cf..1fd4c38d1d5 100644 --- a/icu4c/source/common/appendable.cpp +++ b/icu4c/source/common/appendable.cpp @@ -17,6 +17,8 @@ U_NAMESPACE_BEGIN +Appendable::~Appendable() {} + UBool Appendable::appendCodePoint(UChar32 c) { if(c<=0xffff) { diff --git a/icu4c/source/common/brkiter.cpp b/icu4c/source/common/brkiter.cpp index ec770e38b73..90ba78d1731 100644 --- a/icu4c/source/common/brkiter.cpp +++ b/icu4c/source/common/brkiter.cpp @@ -222,12 +222,16 @@ BreakIterator::~BreakIterator() // ------------------------------------- class ICUBreakIteratorFactory : public ICUResourceBundleFactory { +public: + virtual ~ICUBreakIteratorFactory(); protected: virtual UObject* handleCreate(const Locale& loc, int32_t kind, const ICUService* /*service*/, UErrorCode& status) const { return BreakIterator::makeInstance(loc, kind, status); } }; +ICUBreakIteratorFactory::~ICUBreakIteratorFactory() {} + // ------------------------------------- class ICUBreakIteratorService : public ICULocaleService { @@ -239,6 +243,8 @@ public: registerFactory(new ICUBreakIteratorFactory(), status); } + virtual ~ICUBreakIteratorService(); + virtual UObject* cloneInstance(UObject* instance) const { return ((BreakIterator*)instance)->clone(); } @@ -256,6 +262,8 @@ public: } }; +ICUBreakIteratorService::~ICUBreakIteratorService() {} + // ------------------------------------- U_NAMESPACE_END diff --git a/icu4c/source/common/bytestream.cpp b/icu4c/source/common/bytestream.cpp index e2142ce1eae..ebd4148e02f 100644 --- a/icu4c/source/common/bytestream.cpp +++ b/icu4c/source/common/bytestream.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2009-2010, International Business Machines +// Copyright (C) 2009-2011, International Business Machines // Corporation and others. All Rights Reserved. // // Copyright 2007 Google Inc. All Rights Reserved. @@ -10,6 +10,8 @@ U_NAMESPACE_BEGIN +ByteSink::~ByteSink() {} + char* ByteSink::GetAppendBuffer(int32_t min_capacity, int32_t /*desired_capacity_hint*/, char* scratch, int32_t scratch_capacity, @@ -29,6 +31,8 @@ CheckedArrayByteSink::CheckedArrayByteSink(char* outbuf, int32_t capacity) size_(0), appended_(0), overflowed_(FALSE) { } +CheckedArrayByteSink::~CheckedArrayByteSink() {} + CheckedArrayByteSink& CheckedArrayByteSink::Reset() { size_ = appended_ = 0; overflowed_ = FALSE; diff --git a/icu4c/source/common/chariter.cpp b/icu4c/source/common/chariter.cpp index a598bd65888..2d923ea0a6b 100644 --- a/icu4c/source/common/chariter.cpp +++ b/icu4c/source/common/chariter.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 1999-2004, International Business Machines +* Copyright (C) 1999-2011, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** */ @@ -63,6 +63,8 @@ CharacterIterator::CharacterIterator(int32_t length, int32_t textBegin, int32_t } } +CharacterIterator::~CharacterIterator() {} + CharacterIterator::CharacterIterator(const CharacterIterator &that) : ForwardCharacterIterator(that), textLength(that.textLength), pos(that.pos), begin(that.begin), end(that.end) diff --git a/icu4c/source/common/errorcode.cpp b/icu4c/source/common/errorcode.cpp index 4ff151e3e48..43868b7046d 100644 --- a/icu4c/source/common/errorcode.cpp +++ b/icu4c/source/common/errorcode.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2009, International Business Machines +* Copyright (C) 2009-2011, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -19,6 +19,8 @@ U_NAMESPACE_BEGIN +ErrorCode::~ErrorCode() {} + UErrorCode ErrorCode::reset() { UErrorCode code = errorCode; errorCode = U_ZERO_ERROR; diff --git a/icu4c/source/common/filterednormalizer2.cpp b/icu4c/source/common/filterednormalizer2.cpp index 9ca56bf7cce..8ecdafe4f02 100644 --- a/icu4c/source/common/filterednormalizer2.cpp +++ b/icu4c/source/common/filterednormalizer2.cpp @@ -26,6 +26,8 @@ U_NAMESPACE_BEGIN +FilteredNormalizer2::~FilteredNormalizer2() {} + UnicodeString & FilteredNormalizer2::normalize(const UnicodeString &src, UnicodeString &dest, diff --git a/icu4c/source/common/locid.cpp b/icu4c/source/common/locid.cpp index b34fde648a6..4085ddbfaed 100644 --- a/icu4c/source/common/locid.cpp +++ b/icu4c/source/common/locid.cpp @@ -982,9 +982,7 @@ public: } } - virtual ~KeywordEnumeration() { - uprv_free(keywords); - } + virtual ~KeywordEnumeration(); virtual StringEnumeration * clone() const { @@ -1034,6 +1032,10 @@ public: const char KeywordEnumeration::fgClassID = '\0'; +KeywordEnumeration::~KeywordEnumeration() { + uprv_free(keywords); +} + StringEnumeration * Locale::createKeywords(UErrorCode &status) const { diff --git a/icu4c/source/common/normalizer2.cpp b/icu4c/source/common/normalizer2.cpp index 92cc7a7a7d2..4879550c17f 100644 --- a/icu4c/source/common/normalizer2.cpp +++ b/icu4c/source/common/normalizer2.cpp @@ -33,8 +33,12 @@ U_NAMESPACE_BEGIN // Public API dispatch via Normalizer2 subclasses -------------------------- *** +Normalizer2::~Normalizer2() {} + // Normalizer2 implementation for the old UNORM_NONE. class NoopNormalizer2 : public Normalizer2 { + virtual ~NoopNormalizer2(); + virtual UnicodeString & normalize(const UnicodeString &src, UnicodeString &dest, @@ -95,11 +99,14 @@ class NoopNormalizer2 : public Normalizer2 { virtual UBool isInert(UChar32) const { return TRUE; } }; +NoopNormalizer2::~NoopNormalizer2() {} + // Intermediate class: // Has Normalizer2Impl and does boilerplate argument checking and setup. class Normalizer2WithImpl : public Normalizer2 { public: Normalizer2WithImpl(const Normalizer2Impl &ni) : impl(ni) {} + virtual ~Normalizer2WithImpl(); // normalize virtual UnicodeString & @@ -234,9 +241,12 @@ public: const Normalizer2Impl &impl; }; +Normalizer2WithImpl::~Normalizer2WithImpl() {} + class DecomposeNormalizer2 : public Normalizer2WithImpl { public: DecomposeNormalizer2(const Normalizer2Impl &ni) : Normalizer2WithImpl(ni) {} + virtual ~DecomposeNormalizer2(); private: virtual void @@ -264,10 +274,13 @@ private: virtual UBool isInert(UChar32 c) const { return impl.isDecompInert(c); } }; +DecomposeNormalizer2::~DecomposeNormalizer2() {} + class ComposeNormalizer2 : public Normalizer2WithImpl { public: ComposeNormalizer2(const Normalizer2Impl &ni, UBool fcc) : Normalizer2WithImpl(ni), onlyContiguous(fcc) {} + virtual ~ComposeNormalizer2(); private: virtual void @@ -335,9 +348,12 @@ private: const UBool onlyContiguous; }; +ComposeNormalizer2::~ComposeNormalizer2() {} + class FCDNormalizer2 : public Normalizer2WithImpl { public: FCDNormalizer2(const Normalizer2Impl &ni) : Normalizer2WithImpl(ni) {} + virtual ~FCDNormalizer2(); private: virtual void @@ -362,6 +378,8 @@ private: virtual UBool isInert(UChar32 c) const { return impl.isFCDInert(c); } }; +FCDNormalizer2::~FCDNormalizer2() {} + // instance cache ---------------------------------------------------------- *** struct Norm2AllModes : public UMemory { diff --git a/icu4c/source/common/serv.cpp b/icu4c/source/common/serv.cpp index 7e5ca53107d..6564312b99c 100644 --- a/icu4c/source/common/serv.cpp +++ b/icu4c/source/common/serv.cpp @@ -120,6 +120,8 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ICUServiceKey) ****************************************************************** */ +ICUServiceFactory::~ICUServiceFactory() {} + SimpleFactory::SimpleFactory(UObject* instanceToAdopt, const UnicodeString& id, UBool visible) : _instance(instanceToAdopt), _id(id), _visible(visible) { @@ -188,6 +190,8 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SimpleFactory) ****************************************************************** */ +ServiceListener::~ServiceListener() {} + UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ServiceListener) /* diff --git a/icu4c/source/common/serv.h b/icu4c/source/common/serv.h index 852c04dba9a..5100809409d 100644 --- a/icu4c/source/common/serv.h +++ b/icu4c/source/common/serv.h @@ -211,6 +211,7 @@ public: */ class U_COMMON_API ICUServiceFactory : public UObject { public: + virtual ~ICUServiceFactory(); /** *

Create a service object from the key, if this factory @@ -367,6 +368,8 @@ public: */ class U_COMMON_API ServiceListener : public EventListener { public: + virtual ~ServiceListener(); + /** *

This method is called when the service changes. At the time of the * call this listener is registered with the service. It must diff --git a/icu4c/source/common/servls.cpp b/icu4c/source/common/servls.cpp index 570c10a2628..0e29bfcee6f 100644 --- a/icu4c/source/common/servls.cpp +++ b/icu4c/source/common/servls.cpp @@ -199,7 +199,7 @@ public: return NULL; } - virtual ~ServiceEnumeration() {} + virtual ~ServiceEnumeration(); virtual StringEnumeration *clone() const { UErrorCode status = U_ZERO_ERROR; @@ -248,6 +248,8 @@ public: virtual UClassID getDynamicClassID(void) const; }; +ServiceEnumeration::~ServiceEnumeration() {} + UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ServiceEnumeration) StringEnumeration* diff --git a/icu4c/source/common/triedict.cpp b/icu4c/source/common/triedict.cpp index 0dbb566351e..4f8c9965ae3 100644 --- a/icu4c/source/common/triedict.cpp +++ b/icu4c/source/common/triedict.cpp @@ -1,6 +1,6 @@ /** ******************************************************************************* - * Copyright (C) 2006-2008, International Business Machines Corporation * + * Copyright (C) 2006-2011, International Business Machines Corporation * * and others. All Rights Reserved. * ******************************************************************************* */ @@ -249,10 +249,9 @@ public: fBranchStack.push(kLessThan, status); unistr.remove(); } - - virtual ~MutableTrieEnumeration() { - } - + + virtual ~MutableTrieEnumeration(); + virtual StringEnumeration *clone() const { UErrorCode status = U_ZERO_ERROR; return new MutableTrieEnumeration(fRoot, status); @@ -340,6 +339,8 @@ public: } }; +MutableTrieEnumeration::~MutableTrieEnumeration() {} + UOBJECT_DEFINE_RTTI_IMPLEMENTATION(MutableTrieEnumeration) StringEnumeration * @@ -558,10 +559,9 @@ public: fIndexStack.push(0, status); unistr.remove(); } - - virtual ~CompactTrieEnumeration() { - } - + + virtual ~CompactTrieEnumeration(); + virtual StringEnumeration *clone() const { UErrorCode status = U_ZERO_ERROR; return new CompactTrieEnumeration(fHeader, status); @@ -588,6 +588,8 @@ public: } }; +CompactTrieEnumeration::~CompactTrieEnumeration() {} + UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CompactTrieEnumeration) const UnicodeString * @@ -689,10 +691,9 @@ class BuildCompactTrieNode: public UMemory { fNodeID = nodes.size(); nodes.push(this, status); } - - virtual ~BuildCompactTrieNode() { - } - + + virtual ~BuildCompactTrieNode(); + virtual uint32_t size() { return sizeof(uint16_t); } @@ -705,6 +706,8 @@ class BuildCompactTrieNode: public UMemory { } }; +BuildCompactTrieNode::~BuildCompactTrieNode() {} + class BuildCompactTrieHorizontalNode: public BuildCompactTrieNode { public: UStack fLinks; @@ -713,10 +716,9 @@ class BuildCompactTrieHorizontalNode: public BuildCompactTrieNode { BuildCompactTrieHorizontalNode(UBool parentEndsWord, UStack &nodes, UErrorCode &status) : BuildCompactTrieNode(parentEndsWord, FALSE, nodes, status), fLinks(status) { } - - virtual ~BuildCompactTrieHorizontalNode() { - } - + + virtual ~BuildCompactTrieHorizontalNode(); + virtual uint32_t size() { return offsetof(CompactTrieHorizontalNode,entries) + (fChars.length()*sizeof(CompactTrieHorizontalEntry)); @@ -745,6 +747,8 @@ class BuildCompactTrieHorizontalNode: public BuildCompactTrieNode { } }; +BuildCompactTrieHorizontalNode::~BuildCompactTrieHorizontalNode() {} + class BuildCompactTrieVerticalNode: public BuildCompactTrieNode { public: BuildCompactTrieNode *fEqual; @@ -754,10 +758,9 @@ class BuildCompactTrieVerticalNode: public BuildCompactTrieNode { : BuildCompactTrieNode(parentEndsWord, TRUE, nodes, status) { fEqual = NULL; } - - virtual ~BuildCompactTrieVerticalNode() { - } - + + virtual ~BuildCompactTrieVerticalNode(); + virtual uint32_t size() { return offsetof(CompactTrieVerticalNode,chars) + (fChars.length()*sizeof(uint16_t)); } @@ -786,6 +789,8 @@ class BuildCompactTrieVerticalNode: public BuildCompactTrieNode { } }; +BuildCompactTrieVerticalNode::~BuildCompactTrieVerticalNode() {} + // Forward declaration static void walkHorizontal(const TernaryNode *node, BuildCompactTrieHorizontalNode *building, diff --git a/icu4c/source/common/unicode/appendable.h b/icu4c/source/common/unicode/appendable.h index f7af6667875..fb305cf48a4 100644 --- a/icu4c/source/common/unicode/appendable.h +++ b/icu4c/source/common/unicode/appendable.h @@ -48,6 +48,12 @@ class UnicodeString; */ class U_COMMON_API Appendable : public UObject { public: + /** + * Destructor. + * @draft ICU 4.8 + */ + ~Appendable(); + /** * Appends a 16-bit code unit. * @param c code unit @@ -155,6 +161,12 @@ public: */ explicit UnicodeStringAppendable(UnicodeString &s) : str(s) {} + /** + * Destructor. + * @draft ICU 4.8 + */ + ~UnicodeStringAppendable(); + /** * Appends a 16-bit code unit to the string. * @param c code unit diff --git a/icu4c/source/common/unicode/bytestream.h b/icu4c/source/common/unicode/bytestream.h index fb9e07a25dc..d13ac895638 100644 --- a/icu4c/source/common/unicode/bytestream.h +++ b/icu4c/source/common/unicode/bytestream.h @@ -1,4 +1,4 @@ -// Copyright (C) 2009-2010, International Business Machines +// Copyright (C) 2009-2011, International Business Machines // Corporation and others. All Rights Reserved. // // Copyright 2007 Google Inc. All Rights Reserved. @@ -56,7 +56,7 @@ public: * Virtual destructor. * @stable ICU 4.2 */ - virtual ~ByteSink() { } + virtual ~ByteSink(); /** * Append "bytes[0,n-1]" to this. @@ -149,6 +149,11 @@ public: * @stable ICU 4.2 */ CheckedArrayByteSink(char* outbuf, int32_t capacity); + /** + * Destructor. + * @stable ICU 4.2 + */ + virtual ~CheckedArrayByteSink(); /** * Returns the sink to its original state, without modifying the buffer. * Useful for reusing both the buffer and the sink for multiple streams. diff --git a/icu4c/source/common/unicode/chariter.h b/icu4c/source/common/unicode/chariter.h index 12fc9248a23..e8d65090a40 100644 --- a/icu4c/source/common/unicode/chariter.h +++ b/icu4c/source/common/unicode/chariter.h @@ -1,7 +1,7 @@ /* ******************************************************************** * -* Copyright (C) 1997-2005, International Business Machines +* Copyright (C) 1997-2011, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************** @@ -361,6 +361,12 @@ public: */ enum EOrigin { kStart, kCurrent, kEnd }; + /** + * Destructor. + * @stable ICU 2.0 + */ + virtual ~CharacterIterator(); + /** * Returns a pointer to a new CharacterIterator of the same * concrete class as this one, and referring to the same diff --git a/icu4c/source/common/unicode/errorcode.h b/icu4c/source/common/unicode/errorcode.h index 0d9d2bdc160..3b601810d7b 100644 --- a/icu4c/source/common/unicode/errorcode.h +++ b/icu4c/source/common/unicode/errorcode.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2009-2010, International Business Machines +* Copyright (C) 2009-2011, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -57,7 +57,7 @@ U_NAMESPACE_BEGIN * \code * class IcuErrorCode: public icu::ErrorCode { * public: - * virtual ~IcuErrorCode() { + * virtual ~IcuErrorCode() { // should be defined in .cpp as "key function" * // Safe because our handleFailure() does not throw exceptions. * if(isFailure()) { handleFailure(); } * } @@ -84,7 +84,7 @@ public: */ ErrorCode() : errorCode(U_ZERO_ERROR) {} /** Destructor, does nothing. See class documentation for details. @stable ICU 4.2 */ - virtual ~ErrorCode() {} + virtual ~ErrorCode(); /** Conversion operator, returns a reference. @stable ICU 4.2 */ operator UErrorCode & () { return errorCode; } /** Conversion operator, returns a pointer. @stable ICU 4.2 */ diff --git a/icu4c/source/common/unicode/idna.h b/icu4c/source/common/unicode/idna.h index 4047d967e46..e0c0cebe7d1 100644 --- a/icu4c/source/common/unicode/idna.h +++ b/icu4c/source/common/unicode/idna.h @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2010, International Business Machines +* Copyright (C) 2010-2011, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************* * file name: idna.h @@ -47,6 +47,12 @@ class U_COMMON_API IDNAInfo; */ class U_COMMON_API IDNA : public UObject { public: + /** + * Destructor. + * @draft ICU 4.6 + */ + ~IDNA(); + /** * Returns an IDNA instance which implements UTS #46. * Returns an unmodifiable instance, owned by the caller. diff --git a/icu4c/source/common/unicode/normalizer2.h b/icu4c/source/common/unicode/normalizer2.h index 1486ca881ca..df39aded7eb 100644 --- a/icu4c/source/common/unicode/normalizer2.h +++ b/icu4c/source/common/unicode/normalizer2.h @@ -77,6 +77,12 @@ U_NAMESPACE_BEGIN */ class U_COMMON_API Normalizer2 : public UObject { public: + /** + * Destructor. + * @stable ICU 4.4 + */ + ~Normalizer2(); + /** * Returns a Normalizer2 instance which uses the specified data file * (packageName/name similar to ucnv_openPackage() and ures_open()/ResourceBundle) @@ -338,6 +344,12 @@ public: FilteredNormalizer2(const Normalizer2 &n2, const UnicodeSet &filterSet) : norm2(n2), set(filterSet) {} + /** + * Destructor. + * @stable ICU 4.4 + */ + ~FilteredNormalizer2(); + /** * Writes the normalized form of the source string to the destination string * (replacing its contents) and returns the destination string. diff --git a/icu4c/source/common/unistr.cpp b/icu4c/source/common/unistr.cpp index 206e87f7414..d66edb53fd9 100644 --- a/icu4c/source/common/unistr.cpp +++ b/icu4c/source/common/unistr.cpp @@ -1626,6 +1626,8 @@ UnicodeString::cloneArrayIfNeeded(int32_t newCapacity, // UnicodeStringAppendable ------------------------------------------------- *** +UnicodeStringAppendable::~UnicodeStringAppendable() {} + UBool UnicodeStringAppendable::appendCodeUnit(UChar c) { return str.doReplace(str.length(), 0, &c, 0, 1).isWritable(); diff --git a/icu4c/source/common/uts46.cpp b/icu4c/source/common/uts46.cpp index c81c467eec7..aa9b1a6fe7d 100644 --- a/icu4c/source/common/uts46.cpp +++ b/icu4c/source/common/uts46.cpp @@ -66,6 +66,8 @@ isASCIIOkBiDi(const char *s, int32_t length); // IDNA class default implementations -------------------------------------- *** +IDNA::~IDNA() {} + void IDNA::labelToASCII_UTF8(const StringPiece &label, ByteSink &dest, IDNAInfo &info, UErrorCode &errorCode) const { diff --git a/icu4c/source/i18n/astro.cpp b/icu4c/source/i18n/astro.cpp index 95ddfa3d757..f4ea55e146a 100644 --- a/icu4c/source/i18n/astro.cpp +++ b/icu4c/source/i18n/astro.cpp @@ -1,6 +1,6 @@ /************************************************************************ - * Copyright (C) 1996-2008, International Business Machines Corporation * - * and others. All Rights Reserved. * + * Copyright (C) 1996-2011, International Business Machines Corporation + * and others. All Rights Reserved. ************************************************************************ * 2003-nov-07 srl Port from Java */ @@ -721,9 +721,12 @@ CalendarAstronomer::AngleFunc::~AngleFunc() {} */ class SunTimeAngleFunc : public CalendarAstronomer::AngleFunc { public: + virtual ~SunTimeAngleFunc(); virtual double eval(CalendarAstronomer& a) { return a.getSunLongitude(); } }; +SunTimeAngleFunc::~SunTimeAngleFunc() {} + UDate CalendarAstronomer::getSunTime(double desired, UBool next) { SunTimeAngleFunc func; @@ -738,9 +741,12 @@ CalendarAstronomer::CoordFunc::~CoordFunc() {} class RiseSetCoordFunc : public CalendarAstronomer::CoordFunc { public: + virtual ~RiseSetCoordFunc(); virtual void eval(CalendarAstronomer::Equatorial& result, CalendarAstronomer&a) { a.getSunPosition(result); } }; +RiseSetCoordFunc::~RiseSetCoordFunc() {} + UDate CalendarAstronomer::getSunRiseSet(UBool rise) { UDate t0 = fTime; @@ -1217,9 +1223,12 @@ const CalendarAstronomer::MoonAge CalendarAstronomer::FULL_MOON() { class MoonTimeAngleFunc : public CalendarAstronomer::AngleFunc { public: + virtual ~MoonTimeAngleFunc(); virtual double eval(CalendarAstronomer&a) { return a.getMoonAge(); } }; +MoonTimeAngleFunc::~MoonTimeAngleFunc() {} + /*const CalendarAstronomer::MoonAge CalendarAstronomer::LAST_QUARTER() { return CalendarAstronomer::MoonAge((CalendarAstronomer::PI*3)/2); }*/ @@ -1260,9 +1269,12 @@ UDate CalendarAstronomer::getMoonTime(const CalendarAstronomer::MoonAge& desired class MoonRiseSetCoordFunc : public CalendarAstronomer::CoordFunc { public: + virtual ~MoonRiseSetCoordFunc(); virtual void eval(CalendarAstronomer::Equatorial& result, CalendarAstronomer&a) { result = a.getMoonPosition(); } }; +MoonRiseSetCoordFunc::~MoonRiseSetCoordFunc() {} + /** * Returns the time (GMT) of sunrise or sunset on the local date to which * this calendar is currently set. diff --git a/icu4c/source/i18n/calendar.cpp b/icu4c/source/i18n/calendar.cpp index 6b398937de0..05eded8cd63 100644 --- a/icu4c/source/i18n/calendar.cpp +++ b/icu4c/source/i18n/calendar.cpp @@ -357,7 +357,7 @@ public: BasicCalendarFactory() : LocaleKeyFactory(LocaleKeyFactory::INVISIBLE) { } - virtual ~BasicCalendarFactory() {} + virtual ~BasicCalendarFactory(); protected: //virtual UBool isSupportedID( const UnicodeString& id, UErrorCode& status) const { @@ -416,6 +416,7 @@ protected: } }; +BasicCalendarFactory::~BasicCalendarFactory() {} /** * A factory which looks up the DefaultCalendar resource to determine which class of calendar to use @@ -423,7 +424,8 @@ protected: class DefaultCalendarFactory : public ICUResourceBundleFactory { public: - DefaultCalendarFactory(): ICUResourceBundleFactory() { } + DefaultCalendarFactory() : ICUResourceBundleFactory() { } + virtual ~DefaultCalendarFactory(); protected: virtual UObject* create(const ICUServiceKey& key, const ICUService* /*service*/, UErrorCode& status) const { @@ -443,6 +445,8 @@ protected: } }; +DefaultCalendarFactory::~DefaultCalendarFactory() {} + // ------------------------------------- class CalendarService : public ICULocaleService { public: @@ -453,6 +457,8 @@ public: registerFactory(new DefaultCalendarFactory(), status); } + virtual ~CalendarService(); + virtual UObject* cloneInstance(UObject* instance) const { UnicodeString *s = dynamic_cast(instance); if(s != NULL) { @@ -492,6 +498,8 @@ public: } }; +CalendarService::~CalendarService() {} + // ------------------------------------- static inline UBool diff --git a/icu4c/source/i18n/coll.cpp b/icu4c/source/i18n/coll.cpp index 0a99070d826..3f05f696e45 100644 --- a/icu4c/source/i18n/coll.cpp +++ b/icu4c/source/i18n/coll.cpp @@ -112,11 +112,14 @@ CollatorFactory::getDisplayName(const Locale& objectLocale, class ICUCollatorFactory : public ICUResourceBundleFactory { public: - ICUCollatorFactory(): ICUResourceBundleFactory(UnicodeString(U_ICUDATA_COLL, -1, US_INV)) { } + ICUCollatorFactory() : ICUResourceBundleFactory(UnicodeString(U_ICUDATA_COLL, -1, US_INV)) { } + virtual ~ICUCollatorFactory(); protected: virtual UObject* create(const ICUServiceKey& key, const ICUService* service, UErrorCode& status) const; }; +ICUCollatorFactory::~ICUCollatorFactory() {} + UObject* ICUCollatorFactory::create(const ICUServiceKey& key, const ICUService* /* service */, UErrorCode& status) const { if (handlesKey(key, status)) { @@ -142,7 +145,9 @@ public: UErrorCode status = U_ZERO_ERROR; registerFactory(new ICUCollatorFactory(), status); } - + + virtual ~ICUCollatorService(); + virtual UObject* cloneInstance(UObject* instance) const { return ((Collator*)instance)->clone(); } @@ -188,6 +193,8 @@ public: } }; +ICUCollatorService::~ICUCollatorService() {} + // ------------------------------------- static ICULocaleService* @@ -630,13 +637,9 @@ public: } } } - - virtual ~CFactory() - { - delete _delegate; - delete _ids; - } - + + virtual ~CFactory(); + virtual UObject* create(const ICUServiceKey& key, const ICUService* service, UErrorCode& status) const; protected: @@ -652,6 +655,12 @@ protected: getDisplayName(const UnicodeString& id, const Locale& locale, UnicodeString& result) const; }; +CFactory::~CFactory() +{ + delete _delegate; + delete _ids; +} + UObject* CFactory::create(const ICUServiceKey& key, const ICUService* /* service */, UErrorCode& status) const { @@ -722,8 +731,7 @@ public: //isAvailableLocaleListInitialized(status); } - virtual ~CollationLocaleListEnumeration() { - } + virtual ~CollationLocaleListEnumeration(); virtual StringEnumeration * clone() const { @@ -765,6 +773,8 @@ public: } }; +CollationLocaleListEnumeration::~CollationLocaleListEnumeration() {} + UOBJECT_DEFINE_RTTI_IMPLEMENTATION(CollationLocaleListEnumeration) diff --git a/icu4c/source/i18n/csr2022.cpp b/icu4c/source/i18n/csr2022.cpp index 84d9495057f..a890d11bda5 100644 --- a/icu4c/source/i18n/csr2022.cpp +++ b/icu4c/source/i18n/csr2022.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** - * Copyright (C) 2005-2009, International Business Machines + * Copyright (C) 2005-2011, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** */ @@ -136,6 +136,8 @@ static const uint8_t escapeSequences_2022CN[][5] = { {0x1b, 0x4f, 0x00, 0x00, 0x00}, // SS3 }; +CharsetRecog_2022JP::~CharsetRecog_2022JP() {} + const char *CharsetRecog_2022JP::getName() const { return "ISO-2022-JP"; @@ -146,6 +148,8 @@ int32_t CharsetRecog_2022JP::match(InputText *textIn) return match_2022(textIn->fInputBytes, textIn->fInputLen, escapeSequences_2022JP, ARRAY_SIZE(escapeSequences_2022JP)); } +CharsetRecog_2022KR::~CharsetRecog_2022KR() {} + const char *CharsetRecog_2022KR::getName() const { return "ISO-2022-KR"; @@ -156,6 +160,8 @@ int32_t CharsetRecog_2022KR::match(InputText *textIn) return match_2022(textIn->fInputBytes, textIn->fInputLen, escapeSequences_2022KR, ARRAY_SIZE(escapeSequences_2022KR)); } +CharsetRecog_2022CN::~CharsetRecog_2022CN() {} + const char *CharsetRecog_2022CN::getName() const { return "ISO-2022-CN"; diff --git a/icu4c/source/i18n/csr2022.h b/icu4c/source/i18n/csr2022.h index 5d34711bdc3..2b5b40fb1e3 100644 --- a/icu4c/source/i18n/csr2022.h +++ b/icu4c/source/i18n/csr2022.h @@ -1,6 +1,6 @@ /* ********************************************************************** - * Copyright (C) 2005-2006, International Business Machines + * Copyright (C) 2005-2011, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** */ @@ -52,8 +52,8 @@ protected: class CharsetRecog_2022JP :public CharsetRecog_2022 { -public: - virtual ~CharsetRecog_2022JP() {} +public: + virtual ~CharsetRecog_2022JP(); const char *getName() const; @@ -61,8 +61,8 @@ public: }; class CharsetRecog_2022KR :public CharsetRecog_2022 { -public: - virtual ~CharsetRecog_2022KR() {} +public: + virtual ~CharsetRecog_2022KR(); const char *getName() const; @@ -72,8 +72,8 @@ public: class CharsetRecog_2022CN :public CharsetRecog_2022 { -public: - virtual ~CharsetRecog_2022CN() {} +public: + virtual ~CharsetRecog_2022CN(); const char* getName() const; diff --git a/icu4c/source/i18n/dtptngen.cpp b/icu4c/source/i18n/dtptngen.cpp index ade425404bd..f1217921216 100644 --- a/icu4c/source/i18n/dtptngen.cpp +++ b/icu4c/source/i18n/dtptngen.cpp @@ -1539,6 +1539,8 @@ PatternMap::getDuplicateElem( DateTimeMatcher::DateTimeMatcher(void) { } +DateTimeMatcher::~DateTimeMatcher() {} + DateTimeMatcher::DateTimeMatcher(const DateTimeMatcher& other) { copyFrom(other.skeleton); } @@ -1832,6 +1834,8 @@ FormatParser::isPatternSeparator(UnicodeString& field) { return TRUE; } +DistanceInfo::~DistanceInfo() {} + void DistanceInfo::setTo(DistanceInfo &other) { missingFieldMask = other.missingFieldMask; diff --git a/icu4c/source/i18n/dtptngen_impl.h b/icu4c/source/i18n/dtptngen_impl.h index acc55b18724..e1030a28128 100644 --- a/icu4c/source/i18n/dtptngen_impl.h +++ b/icu4c/source/i18n/dtptngen_impl.h @@ -166,7 +166,7 @@ public: int32_t extraFieldMask; DistanceInfo() {} - virtual ~DistanceInfo() {} + virtual ~DistanceInfo(); void clear() { missingFieldMask = extraFieldMask = 0; } void setTo(DistanceInfo& other); void addMissing(int32_t field) { missingFieldMask |= (1<= 0 ? number : -number; } virtual double transformNumber(double number) const { return uprv_fabs(number); } @@ -244,6 +260,8 @@ public: virtual UClassID getDynamicClassID(void) const; }; +AbsoluteValueSubstitution::~AbsoluteValueSubstitution() {} + class NumeratorSubstitution : public NFSubstitution { double denominator; int64_t ldenominator; @@ -267,6 +285,7 @@ public: ldenominator = util64_fromDouble(denominator); withZeros = description.endsWith(LTLT, 2); } + virtual ~NumeratorSubstitution(); virtual UBool operator==(const NFSubstitution& rhs) const; @@ -293,6 +312,8 @@ public: virtual UClassID getDynamicClassID(void) const; }; +NumeratorSubstitution::~NumeratorSubstitution() {} + class NullSubstitution : public NFSubstitution { public: NullSubstitution(int32_t _pos, @@ -301,6 +322,7 @@ public: const UnicodeString& description, UErrorCode& status) : NFSubstitution(_pos, _ruleSet, formatter, description, status) {} + virtual ~NullSubstitution(); virtual void toString(UnicodeString& /*result*/) const {} virtual void doSubstitution(double /*number*/, UnicodeString& /*toInsertInto*/, int32_t /*_pos*/) const {} @@ -324,6 +346,8 @@ public: virtual UClassID getDynamicClassID(void) const; }; +NullSubstitution::~NullSubstitution() {} + NFSubstitution* NFSubstitution::makeSubstitution(int32_t pos, const NFRule* rule, diff --git a/icu4c/source/i18n/numfmt.cpp b/icu4c/source/i18n/numfmt.cpp index 09ab634f0a1..86c23799820 100644 --- a/icu4c/source/i18n/numfmt.cpp +++ b/icu4c/source/i18n/numfmt.cpp @@ -755,12 +755,16 @@ NumberFormat::getAvailableLocales(int32_t& count) // ------------------------------------- class ICUNumberFormatFactory : public ICUResourceBundleFactory { +public: + virtual ~ICUNumberFormatFactory(); protected: virtual UObject* handleCreate(const Locale& loc, int32_t kind, const ICUService* /* service */, UErrorCode& status) const { return NumberFormat::makeInstance(loc, (UNumberFormatStyle)kind, status); } }; +ICUNumberFormatFactory::~ICUNumberFormatFactory() {} + // ------------------------------------- class NFFactory : public LocaleKeyFactory { @@ -776,11 +780,7 @@ public: { } - virtual ~NFFactory() - { - delete _delegate; - delete _ids; - } + virtual ~NFFactory(); virtual UObject* create(const ICUServiceKey& key, const ICUService* service, UErrorCode& status) const { @@ -824,6 +824,12 @@ protected: } }; +NFFactory::~NFFactory() +{ + delete _delegate; + delete _ids; +} + class ICUNumberFormatService : public ICULocaleService { public: ICUNumberFormatService() @@ -833,6 +839,8 @@ public: registerFactory(new ICUNumberFormatFactory(), status); } + virtual ~ICUNumberFormatService(); + virtual UObject* cloneInstance(UObject* instance) const { return ((NumberFormat*)instance)->clone(); } @@ -850,6 +858,8 @@ public: } }; +ICUNumberFormatService::~ICUNumberFormatService() {} + // ------------------------------------- static ICULocaleService* diff --git a/icu4c/source/i18n/rbnf.cpp b/icu4c/source/i18n/rbnf.cpp index cd1132dea2e..6e24878b751 100644 --- a/icu4c/source/i18n/rbnf.cpp +++ b/icu4c/source/i18n/rbnf.cpp @@ -75,7 +75,7 @@ The RTTI code was also removed due to lack of code coverage. */ class LocalizationInfo : public UMemory { protected: - virtual ~LocalizationInfo() {} + virtual ~LocalizationInfo(); uint32_t refcount; public: @@ -109,6 +109,8 @@ public: // static UClassID getStaticClassID(void); }; +LocalizationInfo::~LocalizationInfo() {} + //UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(LocalizationInfo) // if both strings are NULL, this returns TRUE diff --git a/icu4c/source/i18n/rbt_pars.cpp b/icu4c/source/i18n/rbt_pars.cpp index fcdc1c15d7c..ee59a924310 100644 --- a/icu4c/source/i18n/rbt_pars.cpp +++ b/icu4c/source/i18n/rbt_pars.cpp @@ -143,6 +143,8 @@ public: const UVector* variablesVector = 0, const Hashtable* variableNames = 0); + virtual ~ParseData(); + virtual const UnicodeString* lookup(const UnicodeString& s) const; virtual const UnicodeFunctor* lookupMatcher(UChar32 ch) const; @@ -171,6 +173,8 @@ ParseData::ParseData(const TransliterationRuleData* d, const Hashtable* vNames) : data(d), variablesVector(sets), variableNames(vNames) {} +ParseData::~ParseData() {} + /** * Implement SymbolTable API. */ diff --git a/icu4c/source/i18n/timezone.cpp b/icu4c/source/i18n/timezone.cpp index 5512780029c..263e68d1af8 100644 --- a/icu4c/source/i18n/timezone.cpp +++ b/icu4c/source/i18n/timezone.cpp @@ -931,11 +931,7 @@ public: } } - virtual ~TZEnumeration() { - if (localMap != NULL) { - uprv_free(localMap); - } - } + virtual ~TZEnumeration(); virtual StringEnumeration *clone() const { return new TZEnumeration(*this); @@ -963,6 +959,12 @@ public: virtual UClassID getDynamicClassID(void) const; }; +TZEnumeration::~TZEnumeration() { + if (localMap != NULL) { + uprv_free(localMap); + } +} + UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TZEnumeration) StringEnumeration* U_EXPORT2 diff --git a/icu4c/source/i18n/tznames.cpp b/icu4c/source/i18n/tznames.cpp index 0adf95594ff..8660bd1ad3a 100644 --- a/icu4c/source/i18n/tznames.cpp +++ b/icu4c/source/i18n/tznames.cpp @@ -102,6 +102,9 @@ static void sweepCache() { } } +TimeZoneNameMatchInfo::~TimeZoneNameMatchInfo() { +} + class TimeZoneNamesDelegate : public TimeZoneNames { public: TimeZoneNamesDelegate(const Locale& locale, UErrorCode& status); @@ -261,6 +264,9 @@ TimeZoneNamesDelegate::find(const UnicodeString& text, int32_t start, uint32_t t +TimeZoneNames::~TimeZoneNames() { +} + TimeZoneNames* TimeZoneNames::createInstance(const Locale& locale, UErrorCode& status) { return new TimeZoneNamesDelegate(locale, status); diff --git a/icu4c/source/i18n/tznames.h b/icu4c/source/i18n/tznames.h index 0f281c63776..088ded4d1d7 100644 --- a/icu4c/source/i18n/tznames.h +++ b/icu4c/source/i18n/tznames.h @@ -47,10 +47,6 @@ public: virtual UnicodeString& getMetaZoneID(int32_t index, UnicodeString& mzID) const = 0; }; -inline -TimeZoneNameMatchInfo::~TimeZoneNameMatchInfo() { -} - class U_I18N_API TimeZoneNames : public UMemory { public: virtual ~TimeZoneNames(); @@ -72,10 +68,6 @@ public: virtual TimeZoneNameMatchInfo* find(const UnicodeString& text, int32_t start, uint32_t types, UErrorCode& status) const = 0; }; -inline -TimeZoneNames::~TimeZoneNames() { -} - U_NAMESPACE_END #endif #endif diff --git a/icu4c/source/i18n/ucol.cpp b/icu4c/source/i18n/ucol.cpp index 162388cdf71..3bb10699389 100644 --- a/icu4c/source/i18n/ucol.cpp +++ b/icu4c/source/i18n/ucol.cpp @@ -4281,7 +4281,7 @@ public: capacity_ = 0; } } - virtual ~SortKeyByteSink() { uprv_free(ownedBuffer_); } + virtual ~SortKeyByteSink(); virtual void Append(const char *bytes, int32_t n); void Append(const uint8_t *bytes, int32_t n) { Append(reinterpret_cast(bytes), n); } @@ -4350,6 +4350,10 @@ private: uint8_t SortKeyByteSink::lastResortByte_ = 0; +SortKeyByteSink::~SortKeyByteSink() { + uprv_free(ownedBuffer_); +} + void SortKeyByteSink::Append(const char *bytes, int32_t n) { if (n <= 0) { diff --git a/icu4c/source/i18n/unicode/locdspnm.h b/icu4c/source/i18n/unicode/locdspnm.h index 0faa70379c2..e659316ca4a 100644 --- a/icu4c/source/i18n/unicode/locdspnm.h +++ b/icu4c/source/i18n/unicode/locdspnm.h @@ -1,7 +1,7 @@ /* ****************************************************************************** -* Copyright (C) 2010-2011, International Business Machines Corporation and * -* others. All Rights Reserved. * +* Copyright (C) 2010-2011, International Business Machines Corporation and +* others. All Rights Reserved. ****************************************************************************** */ @@ -174,9 +174,6 @@ private: virtual UClassID getDynamicClassID() const; }; -inline LocaleDisplayNames::~LocaleDisplayNames() { -} - inline LocaleDisplayNames* LocaleDisplayNames::createInstance(const Locale& locale) { return LocaleDisplayNames::createInstance(locale, ULDN_STANDARD_NAMES); } diff --git a/icu4c/source/i18n/unicode/measfmt.h b/icu4c/source/i18n/unicode/measfmt.h index a5af55e9d53..d49a9b572d2 100644 --- a/icu4c/source/i18n/unicode/measfmt.h +++ b/icu4c/source/i18n/unicode/measfmt.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2004-2006, International Business Machines +* Copyright (c) 2004-2011, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Author: Alan Liu @@ -39,8 +39,12 @@ U_NAMESPACE_BEGIN * @stable ICU 3.0 */ class U_I18N_API MeasureFormat : public Format { - public: + /** + * Destructor. + * @stable ICU 3.0 + */ + virtual ~MeasureFormat(); /** * Return a formatter for CurrencyAmount objects in the given diff --git a/icu4c/source/test/depstest/dependencies.txt b/icu4c/source/test/depstest/dependencies.txt index 3e87fdfa394..1a1090c85d3 100644 --- a/icu4c/source/test/depstest/dependencies.txt +++ b/icu4c/source/test/depstest/dependencies.txt @@ -705,7 +705,7 @@ group: errorcode # ErrorCode base class errorcode.o deps utypes - PIC + platform group: utypes # u_errorName() utypes.o diff --git a/icu4c/source/test/depstest/depstest.py b/icu4c/source/test/depstest/depstest.py index f25c8c737d4..bcc527b8e15 100755 --- a/icu4c/source/test/depstest/depstest.py +++ b/icu4c/source/test/depstest/depstest.py @@ -32,8 +32,15 @@ _obj_files = {} _symbols_to_files = {} _return_value = 0 +# Classes with vtables (and thus virtual methods). +_virtual_classes = set() +# Classes with weakly defined destructors. +# nm shows a symbol class of "W" rather than "T". +_weak_destructors = set() + def _ReadObjFile(root_path, library_name, obj_name): global _ignored_symbols, _obj_files, _symbols_to_files + global _virtual_classes, _weak_destructors lib_obj_name = library_name + "/" + obj_name if lib_obj_name in _obj_files: print "Warning: duplicate .o file " + lib_obj_name @@ -60,9 +67,15 @@ def _ReadObjFile(root_path, library_name, obj_name): if type == "U": obj_imports.add(name) else: - # TODO: Investigate weak symbols (V, W) with or without values. obj_exports.add(name) _symbols_to_files[name] = lib_obj_name + # Is this a vtable? E.g., "vtable for icu_49::ByteSink". + if name.startswith("vtable for icu"): + _virtual_classes.add(name[name.index("::") + 2:]) + # Is this a destructor? E.g., "icu_49::ByteSink::~ByteSink()". + index = name.find("::~") + if index >= 0 and type == "W": + _weak_destructors.add(name[index + 3:name.index("(", index)]) _obj_files[lib_obj_name] = {"imports": obj_imports, "exports": obj_exports} def _ReadLibrary(root_path, library_name): @@ -126,6 +139,7 @@ def Process(root_path): Modifies dependencies.items: Recursively builds each item's system_symbols and exports. """ global _ignored_symbols, _obj_files, _return_value + global _virtual_classes, _weak_destructors dependencies.Load() for name_and_item in dependencies.items.iteritems(): name = name_and_item[0] @@ -150,6 +164,14 @@ def Process(root_path): if not _return_value: for library_name in dependencies.libraries: _Resolve(library_name, []) + if not _return_value: + virtual_classes_with_weak_destructors = _virtual_classes & _weak_destructors + if virtual_classes_with_weak_destructors: + sys.stderr.write("Error: Some classes have virtual methods, and " + "an implicit or inline destructor " + "(see ICU ticket #8454 for details):\n%s\n" % + sorted(virtual_classes_with_weak_destructors)) + _return_value = 1 def main(): global _return_value diff --git a/icu4c/source/test/threadtest/threadtest.cpp b/icu4c/source/test/threadtest/threadtest.cpp index bece6f2382e..41d606cf095 100644 --- a/icu4c/source/test/threadtest/threadtest.cpp +++ b/icu4c/source/test/threadtest/threadtest.cpp @@ -16,6 +16,7 @@ #include "umutex.h" #include "threadtest.h" +AbstractThreadTest::~AbstractThreadTest() {} //------------------------------------------------------------------------------ // diff --git a/icu4c/source/test/threadtest/threadtest.h b/icu4c/source/test/threadtest/threadtest.h index 1cb38803969..1ad74cfe4ac 100644 --- a/icu4c/source/test/threadtest/threadtest.h +++ b/icu4c/source/test/threadtest/threadtest.h @@ -1,6 +1,6 @@ // //******************************************************************** -// Copyright (C) 2002, International Business Machines +// Copyright (C) 2002-2011, International Business Machines // Corporation and others. All Rights Reserved. //******************************************************************** // @@ -37,10 +37,9 @@ class AbstractThreadTest { public: AbstractThreadTest() {}; - virtual ~AbstractThreadTest() {}; + virtual ~AbstractThreadTest(); virtual void check() = 0; virtual void runOnce() = 0; }; #endif // ABSTRACTTHREADTEST_H - diff --git a/icu4c/source/tools/ctestfw/unicode/uperf.h b/icu4c/source/tools/ctestfw/unicode/uperf.h index 5568f0e6652..a46ca2a7404 100644 --- a/icu4c/source/tools/ctestfw/unicode/uperf.h +++ b/icu4c/source/tools/ctestfw/unicode/uperf.h @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (c) 2002-2007, International Business Machines +* Copyright (c) 2002-2011, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** */ @@ -64,6 +64,11 @@ U_NAMESPACE_USE */ class T_CTEST_EXPORT_API UPerfFunction { public: + /** + * destructor + */ + virtual ~UPerfFunction(); + /** * Subclasses must implement this method to do the action to be * measured. @@ -85,11 +90,6 @@ public: virtual long getEventsPerIteration(){ return -1; } - /** - * destructor - */ - virtual ~UPerfFunction() {} - /** * Call call() n times in a tight loop and return the elapsed * milliseconds. If n is small and call() is fast the return diff --git a/icu4c/source/tools/ctestfw/uperf.cpp b/icu4c/source/tools/ctestfw/uperf.cpp index 31dd8e7990a..e8c34391127 100644 --- a/icu4c/source/tools/ctestfw/uperf.cpp +++ b/icu4c/source/tools/ctestfw/uperf.cpp @@ -15,6 +15,9 @@ #include #if !UCONFIG_NO_CONVERSION + +UPerfFunction::~UPerfFunction() {} + static const char delim = '/'; static int32_t execCount = 0; UPerfTest* UPerfTest::gTest = NULL;