From 6061a89b3d10f7adf237cb5a7bc12dcb8970a651 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Tue, 23 Feb 2021 00:21:04 +0000 Subject: Remove allocator check from BlobMemoryPool to avoid exceptions Allocator validity for nullptr is checked during construction thus not needed to be checked again during destruction. Moreover, ARM_COMPUTE_ERROR_ON on failure throws an exception that should be avoided by a destructor. Signed-off-by: Georgios Pinitas Change-Id: Icd44f8af6824290a44c51d676a43a8f06555e158 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5152 Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- src/runtime/BlobMemoryPool.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/runtime/BlobMemoryPool.cpp b/src/runtime/BlobMemoryPool.cpp index e3d7f0fb65..88e280537c 100644 --- a/src/runtime/BlobMemoryPool.cpp +++ b/src/runtime/BlobMemoryPool.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -41,7 +41,6 @@ BlobMemoryPool::BlobMemoryPool(IAllocator *allocator, std::vector blob BlobMemoryPool::~BlobMemoryPool() { - ARM_COMPUTE_ERROR_ON(!_allocator); free_blobs(); } -- cgit v1.2.1