Alejandro, Thanks for your reply.
> On 20 Apr 2015, at 13:07, Alejandro Exojo <s...@badopi.org> wrote: > > El Monday 20 April 2015, Nuno Santos escribió: >> I’m currently using a QTcpSocket moved to a thread. I’m not sure i’m doing >> it the right way. I was trying to optimize the thought put of the socket >> in order to avoid latency. > > Creating threads for I/O is almost always wrong. The interface that sockets > in > Qt have is asynchronous. Unless you do something slow with the data tha slows > down everything else, you don't need threads for that. I’m working on a new version of the app where I’m already dropping the usage of threads. > >> void LKSong::connectTo(QString name, QString address, int port) >> { >> terminateConnection(); >> >> _thread = new QThread(this); >> _connection = new LKConnection(QHostAddress(address),port); > > A new thread per connection seems even more problematic. :) > > Anyway, how/when are you deleting this thread and this LKConnection objects? > > In that screenshot you have 18 threads. Is this normal? Right now, I don’t have threads created by me and it counts 14 threads, so I guess it is normal and the underlying parts of Qt and iOS are creating them. Regards, Nuno > > -- > Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2 > http://barnacity.net/ | http://disperso.net > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest