From b9e40d50285ac3192b26e1ed6859c6241b7eb09e Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Sun, 12 Sep 2021 14:21:33 +0100 Subject: [PATCH] Updated algo to align with memory management Signed-off-by: Alejandro Saucedo --- src/Algorithm.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Algorithm.cpp b/src/Algorithm.cpp index 9179cffbd..6caccf9bb 100644 --- a/src/Algorithm.cpp +++ b/src/Algorithm.cpp @@ -23,13 +23,13 @@ Algorithm::isInit() void Algorithm::destroy() { - if (this->mPushConstantsData) { - free(this->mPushConstantsData); - } - - if (this->mSpecializationConstantsData) { - free(this->mSpecializationConstantsData); - } + // We don't have to free memory on destroy as it's freed by the commandBuffer destructor + // if (this->mPushConstantsData) { + // free(this->mPushConstantsData); + // } + // if (this->mSpecializationConstantsData) { + // free(this->mSpecializationConstantsData); + // } if (!this->mDevice) { KP_LOG_WARN("Kompute Algorithm destroy function reached with null "