llvm.org GIT mirror llvm / f249449
Fix bug in RefCountedBase/RefCountedBaseVPTR where the reference count was accidentally copied as part of the copy constructor. This could result in objects getting leaked because there reference count was too high. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144931 91177308-0d34-0410-b5e6-96231b3b80d8 Ted Kremenek 8 years ago
1 changed file(s) with 3 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
4545
4646 public:
4747 RefCountedBase() : ref_cnt(0) {}
48 RefCountedBase(const RefCountedBase &) : ref_cnt(0) {}
4849
4950 void Retain() const { ++ref_cnt; }
5051 void Release() const {
6667
6768 protected:
6869 RefCountedBaseVPTR() : ref_cnt(0) {}
70 RefCountedBaseVPTR(const RefCountedBaseVPTR &) : ref_cnt(0) {}
71
6972 virtual ~RefCountedBaseVPTR() {}
7073
7174 void Retain() const { ++ref_cnt; }