From d51178934528ba4be865a5a13c4d98ad0973bb01 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Wed, 27 Feb 2013 19:50:08 +0000 Subject: [PATCH] ICU-9880 do not define a virtual destructor inline X-SVN-Rev: 33342 --- icu4c/source/i18n/alphaindex.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/icu4c/source/i18n/alphaindex.cpp b/icu4c/source/i18n/alphaindex.cpp index e94cdccdd2b..88dcaabec1b 100644 --- a/icu4c/source/i18n/alphaindex.cpp +++ b/icu4c/source/i18n/alphaindex.cpp @@ -132,12 +132,9 @@ public: } } - virtual ~BucketList() { - delete bucketList_; - if (immutableVisibleList_ != bucketList_) { - delete immutableVisibleList_; - } - } + // The virtual destructor must not be inline. + // See ticket #8454 for details. + virtual ~BucketList(); int32_t getBucketCount() const { return immutableVisibleList_->size(); @@ -172,6 +169,13 @@ public: UVector *immutableVisibleList_; }; +BucketList::~BucketList() { + delete bucketList_; + if (immutableVisibleList_ != bucketList_) { + delete immutableVisibleList_; + } +} + AlphabeticIndex::ImmutableIndex::~ImmutableIndex() { delete buckets_; delete collatorPrimaryOnly_;