From ac02fb82d7a76fce4a870acc30891d657a83ab9c Mon Sep 17 00:00:00 2001 From: liaogang Date: Thu, 17 Aug 2017 10:14:05 +0800 Subject: [PATCH] FIX: tensor memory must be gaven back to buddy allocator for free --- paddle/operators/gather_test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paddle/operators/gather_test.cc b/paddle/operators/gather_test.cc index d24d83f29..0ae1e9945 100644 --- a/paddle/operators/gather_test.cc +++ b/paddle/operators/gather_test.cc @@ -45,4 +45,8 @@ TEST(Gather, GatherData) { for (int i = 0; i < 4; ++i) EXPECT_EQ(p_output[i], i + 4); for (int i = 4; i < 8; ++i) EXPECT_EQ(p_output[i], i - 4); + + delete src; + delete index; + delete output; } -- GitLab