From b0b3cd61bf3e32e2a7573dc9c6260fa06c227fd2 Mon Sep 17 00:00:00 2001 From: ZPaC Date: Fri, 28 Aug 2020 15:15:04 +0800 Subject: [PATCH] Fix sparse-slicer leak. --- mindspore/ccsrc/frontend/parallel/ps/worker_proxy.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mindspore/ccsrc/frontend/parallel/ps/worker_proxy.h b/mindspore/ccsrc/frontend/parallel/ps/worker_proxy.h index 8896dabc4b6..dfb481c2320 100644 --- a/mindspore/ccsrc/frontend/parallel/ps/worker_proxy.h +++ b/mindspore/ccsrc/frontend/parallel/ps/worker_proxy.h @@ -502,6 +502,11 @@ void WorkerProxy::SparseSlicer(int timestamp, const ::ps::KVPairs &send, c kvs.lens = reduced_lens; kvs.vals = reduced_data; + + delete[] src_grad_data; + delete[] src_indice_data; + delete[] new_grad; + delete[] new_indices; } if (indices_size <= 0) {