Updated algo to align with memory management

Signed-off-by: Alejandro Saucedo <axsauze@gmail.com>
This commit is contained in:
Alejandro Saucedo 2021-09-12 14:21:33 +01:00
parent 559b83e07f
commit b9e40d5028

View file

@ -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 "