MLECO-4260: Replace raw C++ pointers with smart variants

Model:
Added std::unique_ptr qualifier to Model.cc member and
used make_unique when creating interpreter object
Removed custom destructor and un-necessary memory cleanup following
failed allocation

DataStructures:
Refactored array 2d to use a std::vector under the hood.
This should preserve desired attributes including contiguous
memory while removing the need for custom destructor.
Original size function renamed to dimSize to avoid confusion with
vector.size()
Accompanying changes made to preprocessing and ASR tests.

AppContext:
Replaced use of raw pointers in AppContext.hpp.
Previously a std::map including IAttribute pointers required
individual deallocation as they were allocated using new.

Signed-off-by: Liam Barry <liam.barry@arm.com>
Change-Id: I1a34dce5dea6ecf4883a9ada3a20f827eb6e6d6b
diff --git a/source/application/api/common/include/Model.hpp b/source/application/api/common/include/Model.hpp
index ed2b4c1..1728e1f 100644
--- a/source/application/api/common/include/Model.hpp
+++ b/source/application/api/common/include/Model.hpp
@@ -1,5 +1,5 @@
 /*
- * SPDX-FileCopyrightText: Copyright 2021-2022 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-FileCopyrightText: Copyright 2021-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
  * SPDX-License-Identifier: Apache-2.0
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -134,7 +134,7 @@
 
     private:
         const tflite::Model* m_pModel{nullptr};            /* Tflite model pointer. */
-        tflite::MicroInterpreter* m_pInterpreter{nullptr}; /* Tflite interpreter. */
+        std::unique_ptr<tflite::MicroInterpreter> m_pInterpreter{nullptr}; /* Tflite interpreter. */
         tflite::MicroAllocator* m_pAllocator{nullptr};     /* Tflite micro allocator. */
         bool m_inited{false};                              /* Indicates whether this object has been initialised. */
         const uint8_t* m_modelAddr{nullptr};               /* Model address */