QThread::start: Failed to create thread (the access Code is invalid.) How to fix?

Wrote a program in qt which loads the posts Vkontakte and pictures to them.
Images are loaded like this:
connect(netReply, SIGNAL(readChannelFinished()), &loop, SLOT(quit()));

After the program begins to take ~150 MB 403 and creates a stream writes
QThread::start: Failed to create thread (the access Code is invalid.)

connect(netReply, SIGNAL(readChannelFinished()), &loop, SLOT(quit()), Qt::DirectConnection);

if I understand correctly, there should be less threads.
but after starting the program the same thing happens.
Maybe somewhere is a limit on the run ~400 streams or on the size of the program memory 150 megabytes.

How to remove the limits, or how to reduce the number of threads?
July 9th 19 at 10:55
2 answers
July 9th 19 at 10:57
Made QNetworkAccessManager *manager and QNetworkReply *netReply and use them again.
July 9th 19 at 10:59
A sense to create more threads than can actually be executed in parallel?
The number I think is following the OS itself, but there must be more than 400.
Simplified code to create and delete thread in the Studio.
the fact of the matter is that I myself do not create any threads, it's qt. and how to make them smaller I don't know. so I ask.. - dave34 commented on July 9th 19 at 11:02
if I understand correctly, the code creates threads
connect(netReply, SIGNAL(readChannelFinished()), &loop, SLOT(quit()));

or delete the empty threads. - dave34 commented on July 9th 19 at 11:05
or pixmap. here is the code which is called many times
QImage *new_image = new QImage(path + name);
 QLabel *new_label= new QLabel();
 if (path.contains("http://") || path.contains("https://"))
 QNetworkAccessManager *manager = new QNetworkAccessManager(0);
 QNetworkReply *netReply = manager->get(QNetworkRequest(QUrl(path + name)));
 //QNetworkReply *netReply = manager->get(QNetworkRequest(QUrl("http://cs629111.vk.me/v629111385/3a54c/10FRUstprFo.jpg")));
 QEventLoop loop;
 connect(netReply, SIGNAL(readChannelFinished()), &loop, SLOT(quit()), Qt::DirectConnection);
 Qpixmaps pixmap;
 QByteArray array = netReply->readAll();
 if (pixmap.loadFromData(array))
 new_label->setPixmap(pixmap.scaled(width, height, Qt::KeepAspectRatio));
 } else
 qDebug() << "not loaded" << endl;
- dave34 commented on July 9th 19 at 11:08

Find more questions by tags Qtmultithreading