Andrew Morrow: There are two tests under test/utilities/memory that heap allocate two

integers which remain unused and are subsequently leaked, so the test
fail when run under valgrind. Unless I'm overlooking a subtle reason
why they are needed I think they can be removed, allowing these tests
to pass under valgrind. The attached patch removes the variables. If
there is a reason for them to exist, I can change this to just delete
them at the end of the test.

llvm-svn: 161195
This commit is contained in:
Howard Hinnant 2012-08-02 18:39:48 +00:00
parent 9191865b2d
commit fb2f0a5e01
2 changed files with 0 additions and 4 deletions

View File

@ -43,8 +43,6 @@ void do_nothing(int*) {}
int main()
{
int* ptr1(new int);
int* ptr2(new int);
const std::unique_ptr<int> p1(new int(1));
assert(!(p1 == nullptr));
assert(!(nullptr == p1));

View File

@ -43,8 +43,6 @@ void do_nothing(int*) {}
int main()
{
int* ptr1(new int);
int* ptr2(new int);
const std::shared_ptr<int> p1(new int(1));
assert(!(p1 == nullptr));
assert(!(nullptr == p1));