Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Commit e3c0e70

Browse files
committed
Don't parent the request after all.
1 parent 6b75ccb commit e3c0e70

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/qhttpconnection.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ int QHttpConnection::MessageBegin(http_parser *parser)
121121
{
122122
QHttpConnection *theConnection = static_cast<QHttpConnection*>(parser->data);
123123
theConnection->m_currentHeaders.clear();
124-
theConnection->m_request = new QHttpRequest(theConnection, theConnection /* parent */);
124+
// The QHttpRequest should not be parented to this, since it's memory
125+
// management is the responsibility of the user of the library.
126+
theConnection->m_request = new QHttpRequest(theConnection);
125127
return 0;
126128
}
127129

0 commit comments

Comments
 (0)