zaphoyd/websocketpp — comment on commit 67a2cbcbed9a0ef54256376dcd488e14143dc6bd
File:  line 0
By megabyte1024:

By the way this code was absolutely correct before this fix, even if it used the local "std::vector data;", because the local vector contains elements which refers to the m_write_queue member queue, i.e. after leaving this method the data which will be used by the async_write method is not destroyed.