You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made a simple qml file with a timer that generates a HTTP GET request every 10 ms.
This causes memory leak at a rate of approximately 30-40 kB / second.
A smaller l
eak also exists if interval between requests is larger - ie. 200 ms request interval - leak seems proportional to number of requests.
Leak does not depend on the size of HTTP GET response. I tested with response of approximately 10 bytes, 100 kB, 10 MB.
Hi, I think the reason for the memory leak on every request comes from the allocation of RequestPrototype instance, for example, you can see line #38 on duperagent.cpp:
QJSValue Request::get(const QJSValue &url, const QJSValue &data, const QJSValue &fn) const
{
RequestPrototype *proto = new RequestPrototype(
m_engine,
RequestPrototype::Get,
QUrl(url.toString()));
if (data.isCallable()) {
proto->end(data);
} else if (!data.isUndefined()){
proto->query(data);
}
if (fn.isCallable()) {
proto->end(fn);
}
return proto->self();
}
I made a simple qml file with a timer that generates a HTTP GET request every 10 ms.
This causes memory leak at a rate of approximately 30-40 kB / second.
A smaller l
eak also exists if interval between requests is larger - ie. 200 ms request interval - leak seems proportional to number of requests.
Leak does not depend on the size of HTTP GET response. I tested with response of approximately 10 bytes, 100 kB, 10 MB.
Test environment: Linux Desktop, Qt 5.15.0
Sample:
The text was updated successfully, but these errors were encountered: