From b9174dd5dc2a782e617fe45200ec462bcef26cee Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 20 Mar 2007 02:10:56 +0000 Subject: [PATCH] Add a dtor to fix leaks from all clients of BitVector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35200 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/BitVector.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h index 2b0e127265d..7792ab069ed 100644 --- a/include/llvm/ADT/BitVector.h +++ b/include/llvm/ADT/BitVector.h @@ -86,6 +86,10 @@ public: Bits = new BitWord[Capacity]; std::copy(RHS.Bits, &RHS.Bits[Capacity], Bits); } + + ~BitVector() { + delete[] Bits; + } /// size - Returns the number of bits in this bitvector. unsigned size() const { return Size; } -- 2.34.1