qBittorrent
qBittorrent copied to clipboard
Free resources allocated by web session once it is destructed
Closes #20873. Maybe also #20675.
More explanation in: https://github.com/qbittorrent/qBittorrent/issues/20873#issuecomment-2408992631
@dyseg Please split "WebUI: append port to session cookie name" commit to another PR since it is a breaking change. I've considered it in the past but the breaking impact deters me.
@dyseg Please split "WebUI: append port to session cookie name" commit to another PR since it is a breaking change.
Done (#21619).
I would go Qt way and set session to be parent of controllers. Just add controller->setParent(this); at the end of WebSession::registerAPIController():
void WebSession::registerAPIController(const QString &scope, APIController *controller)
{
Q_ASSERT(controller);
m_apiControllers[scope] = controller;
controller->setParent(this);
}
@glassez Done.
@dyseg Thank you!