From d8913efdc320e72197ca90fa1e072e8cc8f0d040 Mon Sep 17 00:00:00 2001
From: ls232920 <laurent.soulier@cea.fr>
Date: Wed, 18 Oct 2023 16:33:59 +0000
Subject: [PATCH] [MAJ][TBV] replacing unique_tr by shared_ptr for Tensor
 implementation pointer

---
 include/aidge/data/Tensor.hpp | 14 +-------------
 src/data/Tensor.cpp           |  6 ------
 2 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/include/aidge/data/Tensor.hpp b/include/aidge/data/Tensor.hpp
index 0967863c8..9ed78b43c 100644
--- a/include/aidge/data/Tensor.hpp
+++ b/include/aidge/data/Tensor.hpp
@@ -38,19 +38,7 @@ namespace detail
 {
 namespace pimpl
 {
-/// @brief  actual implementation of the deleter
-/// @internal
-void DeleteImpl(TensorImpl *pImpl) noexcept;
-/// @brief  Implementation deleter
-/// @internal
-struct SImplDeleter
-{
-    void operator()(TensorImpl *pImpl) const noexcept
-    {
-        DeleteImpl(pImpl);
-    }
-};
-using ImplPtr_t = std::unique_ptr<TensorImpl, SImplDeleter>;
+using ImplPtr_t = std::shared_ptr<TensorImpl>;
 } // namespace pimpl
 
 /// @brief Check if a valid area is included in another one.
diff --git a/src/data/Tensor.cpp b/src/data/Tensor.cpp
index 729a237f8..cd8098c1e 100644
--- a/src/data/Tensor.cpp
+++ b/src/data/Tensor.cpp
@@ -14,12 +14,6 @@
 
 namespace Aidge
 {
-/// @brief  actual implementation of the deleter
-void detail::pimpl::DeleteImpl(TensorImpl *pImpl) noexcept
-{
-    delete pImpl;
-}
-
 /// @brief Check if a valid area is included in another one.
 bool detail::IsSubTensorIncluded(
     std::vector<Coord_t> const &i_SubFirstDataLogicalCoordinates,
-- 
GitLab