Using std/boost make_shared for creating shared pointers

Fixed boost::function nulling issue
This commit is contained in:
Dmitry Novikov
2014-10-08 15:49:13 +04:00
parent d7a7112c8b
commit f7aeeaaa30
23 changed files with 64 additions and 63 deletions

View File

@@ -124,7 +124,7 @@ int main(int argc, char * argv[]) {
typedef websocketpp::lib::shared_ptr<websocketpp::lib::thread> thread_ptr;
std::vector<thread_ptr> ts;
for (size_t i = 0; i < num_threads; i++) {
ts.push_back(thread_ptr(new websocketpp::lib::thread(&server::run, &testee_server)));
ts.push_back(websocketpp::lib::make_shared<websocketpp::lib::thread>(&server::run, &testee_server));
}
for (size_t i = 0; i < num_threads; i++) {