
28 May
2009
28 May
'09
8:50 p.m.
Wrong allocation of timer in timer_queue.hpp: template <typename Handler> bool enqueue_timer(const time_type& time, Handler handler, void* token) { ... // Create a new timer object. std::auto_ptr<timer<Handler> > new_timer( new timer<Handler>(time, handler, token)); // <-- ATTENTION ... new timer<Handler>(...) later will be dealocated with asio_handler_deallocate Solution: allocate new timers with asio_handler_allocate // Create a new timer object. typedef timer<Handler> timer_type; typedef handler_alloc_traits<Handler, timer_type> alloc_traits; raw_handler_ptr<alloc_traits> raw_ptr(handler); handler_ptr<alloc_traits> new_timer(raw_ptr, time, handler, token);
5860
Age (days ago)
5860
Last active (days ago)
0 comments
1 participants
participants (1)
-
puzirev@gmail.com