Remove used auxilary tensors from ClGemm's tensor pack

When the used auxilary tensors are kept in the tensor pack,
the pointers in the tensor pack can point memory space
that has been already freed. In some cases, this leads
crashes or unpredictable behaviour.

Resolves: COMPMID-4536

Change-Id: I4cc83310dfe084d477a5f9bece216228c3edb172
Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5710
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/arm_compute/core/ITensorPack.h b/arm_compute/core/ITensorPack.h
index 2f41d4d..17b7241 100644
--- a/arm_compute/core/ITensorPack.h
+++ b/arm_compute/core/ITensorPack.h
@@ -95,6 +95,11 @@
      * @return The pointer to the tensor if exist and is const else nullptr
      */
     const ITensor *get_const_tensor(int id) const;
+    /** Remove the tensor stored with the given id
+     *
+     * @param[in] id ID of tensor to remove
+     */
+    void remove_tensor(int id);
     /** Pack size accessor
      *
      * @return Number of tensors registered to the pack