diff --git a/include/aidge/data/Tensor.hpp b/include/aidge/data/Tensor.hpp index 0967863c86c2c86c2953a5f7a8dd07d4a95dbc77..9ed78b43c621f84566b3e053b6c5e70cde0a8899 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 729a237f86a11f4ed33043ce33c7052f072277df..cd8098c1e6eb574736259a53c285c28d378b731b 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,