Subject: [Boost-bugs] [Boost C++ Libraries] #7349: packaged_task holds refence to temporary
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-09-09 07:38:33
#7349: packaged_task holds refence to temporary
--------------------------------------------------------------------+-------
Reporter: olli | Owner: viboes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost 1.52.0 | Severity: Problem
Keywords: allocator_destructor packaged_task temporary reference |
--------------------------------------------------------------------+-------
The ctor of packaged_task creates a rebound allocator on the stack (stack
frame of ctor). the allocator instance is passed to allocator_destructor
which hold a '''reference''' to the allocator. Unfortunately the allocator
instance will be destroyed/invalid after return from ctor.
Suggestion, because of the allocators a required to by copyable
allocator_destructor should store the value of the allocator instance
(using allocators copy-ctor).
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7349> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC