COMPMID-1995: Fix memory management for weights transform in CLFFT

Remove memory manager from weights transformation in
CLFFTConvolutionLayer. Instead move the transformation function into a
unique_ptr and free once the tranformation has been performed.

Change-Id: Iabd691b3d517d60fa0127e44eb37d6df873a37d3
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-on: https://review.mlplatform.org/c/1031
Reviewed-by: Giuseppe Rossini <giuseppe.rossini@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
diff --git a/arm_compute/runtime/CL/functions/CLFFTConvolutionLayer.h b/arm_compute/runtime/CL/functions/CLFFTConvolutionLayer.h
index 0fd2cf3..2fabe34 100644
--- a/arm_compute/runtime/CL/functions/CLFFTConvolutionLayer.h
+++ b/arm_compute/runtime/CL/functions/CLFFTConvolutionLayer.h
@@ -118,7 +118,7 @@
     CLPadLayer                       _pad_input_func;
     CLPadLayer                       _pad_weights_func;
     CLFFT2D                          _transform_input_func;
-    CLFFT2D                          _transform_weights_func;
+    std::unique_ptr<CLFFT2D>         _transform_weights_func;
     CLFFT2D                          _itransform_output_func;
     CLComplexPixelWiseMultiplication _prod_func;
     CLReductionOperation             _reduce_func;