Quote Originally Posted by oop View Post
yes you are right m_clients contains pointers to QWebSocket and they are handled and then destroyed by QWebSocketServer (I am supposing)
First rule of programming: don't make assumptions.
Especially not ones that can be disproven by reading the documentation:
Quote Originally Posted by QtDocs
QWebSocketServer does not take ownership of the returned QWebSocket object. It is up to the caller to delete the object explicitly
Quote Originally Posted by oop View Post
But thus the line I mentioned above ( qDeleteAll(m_clients.begin(),m_clients.end()) is not helpful. I can comment that line, close the application naturally (calling quit()) without memory leaks with or not the qDeleteAll(m_clients.begin(),m_clients.end());.
And how did you check that? Valgrind? Some other memory profiler?

Cheers,
_