From 1ac075919ad7cc0cd39b936ac58e3dcb37903899 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 d4a5e269e86..e74f91962b2 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) {