From fb59cd574e2717b89dc8c7d62c8ea25fbbf7c1fc Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Tue, 28 Feb 2017 07:21:49 -0500 Subject: [PATCH] Copy rebind allocator before impl destruct --- include/boost/smart_ptr/allocate_shared_array.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/smart_ptr/allocate_shared_array.hpp b/include/boost/smart_ptr/allocate_shared_array.hpp index 75adf27..407c103 100644 --- a/include/boost/smart_ptr/allocate_shared_array.hpp +++ b/include/boost/smart_ptr/allocate_shared_array.hpp @@ -748,8 +748,8 @@ public: } void destroy() { - this->~type(); deallocator allocator(allocator_); + this->~type(); allocator.deallocate(this, 1); } @@ -789,8 +789,8 @@ public: } void destroy() { - this->~type(); deallocator allocator(deleter_.allocator()); + this->~type(); allocator.deallocate(this, 1); } @@ -835,8 +835,8 @@ public: } void destroy() { - this->~type(); deallocator allocator(allocator_, deleter_.size()); + this->~type(); allocator.deallocate(this, 1); } @@ -880,8 +880,8 @@ public: } void destroy() { - this->~type(); deallocator allocator(deleter_.allocator(), deleter_.size()); + this->~type(); allocator.deallocate(this, 1); }