aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp
AgeCommit message (Collapse)AuthorFilesLines
2013-11-19[weak vtables] Place class definitions into anonymous namespaces to prevent ↵Juergen Ributzka1-6/+5
weak vtables. This patch places class definitions in implementation files into anonymous namespaces to prevent weak vtables. This eliminates the need of providing an out-of-line definition to pin the vtable explicitly to the file. llvm-svn: 195092
2013-11-19[weak vtables] Remove a bunch of weak vtablesJuergen Ributzka1-1/+4
This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. The memory leaks in this version have been fixed. Thanks Alexey for pointing them out. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 195064
2013-11-18Revert r194865 and r194874.Alexey Samsonov1-3/+1
This change is incorrect. If you delete virtual destructor of both a base class and a subclass, then the following code: Base *foo = new Child(); delete foo; will not cause the destructor for members of Child class. As a result, I observe plently of memory leaks. Notable examples I investigated are: ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl. llvm-svn: 194997
2013-11-15[weak vtables] Remove a bunch of weak vtablesJuergen Ributzka1-1/+3
This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 194865
2012-01-31RefCountedBaseVPTR needs the IntrusiveRefCntPtrInfo as friend,Manuel Klimek1-0/+64
now that this handles the release / retain calls. Adds a regression test for that bug (which is a compile-time regression) and for the last two changes to the IntrusiveRefCntPtr, especially tests for the memory leak due to copy construction of the ref-counted object and ensuring that the traits are used for release / retain calls. llvm-svn: 149411