From 785ab18a054373f1a2f8d0f6f04db2d458878bd9 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Fri, 19 Nov 2010 23:28:59 +0000 Subject: [PATCH] Implement IntervalMap destructor. Key and value objects may not be destructed instantly when they are erased from the container, but they will be destructed eventually by the IntervalMap destructor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119873 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/IntervalMap.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/llvm/ADT/IntervalMap.h b/include/llvm/ADT/IntervalMap.h index 96b5161da7f..56fbe933541 100644 --- a/include/llvm/ADT/IntervalMap.h +++ b/include/llvm/ADT/IntervalMap.h @@ -848,6 +848,11 @@ public: new(&rootLeaf()) RootLeaf(); } + ~IntervalMap() { + clear(); + rootLeaf().~RootLeaf(); + } + /// empty - Return true when no intervals are mapped. bool empty() const { return rootSize == 0; -- 2.34.1