id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 11647,add cleanup expired connections API,Lutts Cao ,Frank Mori Hess,"when use signals2 with tracked shared object, it will cause memory leak when the shared track object which is allocated with allocated_shared() or make_shared() is destructed another problem is: after the shared track object is destructed, signals2::connection::connected() will return false, and signals2::connection::disconnect() will do nothing according to signals2's code, expired connection cleanup will happen after operator() is called, and maybe happen when signal.connect() is called. '''there is a problem when the signal is rarely emited, which means the time between successive operator() calls is long'' I have tried boost 1.59.0, expired connection cause memory leak is still a problem. I suggested to add an explicit cleanup API to signals2::signal class to let the user cleanup expired connections explicitly or '''if you think add such an API is not a must, may be you can add a comment in boost.signals2 document to warn the users that there may be memory leak.''' == make_shared() and allocated_shared() in boost == document can be found at http://www.boost.org/doc/libs/1_59_0/libs/smart_ptr/make_shared.html it is explicitly said these two function templates will use a single allocation, '''eliminating a significant portion of shared_ptr's construction overhead. This eliminates one of the major efficiency complaints about shared_ptr''' == make_shared() and allocated_shared() in C++11 standard spec === in C++11 standard section 20.7.2.2.6.6 at page 573: '''Implementations are encouraged, but not required, to perform no more than one memory allocation.''' == make_shared() and allocated_shared() in Compiler implementations == as far as I know, GCC, CLang and Microsoft Visual Studio all use '''single allocation''",Feature Requests,closed,To Be Determined,signals2,Boost 1.59.0,Problem,worksforme,,