From e4b94afe25c8026d61a726c778088c3cc627ef13 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 21 Apr 2010 12:17:44 +0200 Subject: QNAM: Add a code comment related to the cache --- src/network/access/qnetworkreplyimpl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 59c7d76..320b1ac 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -580,8 +580,13 @@ QNetworkReplyImpl::QNetworkReplyImpl(QObject *parent) QNetworkReplyImpl::~QNetworkReplyImpl() { Q_D(QNetworkReplyImpl); + + // This code removes the data from the cache if it was prematurely aborted. + // See QNetworkReplyImplPrivate::completeCacheSave(), we disable caching there after the cache + // save had been properly finished. So if it is still enabled it means we got deleted/aborted. if (d->isCachingEnabled()) d->networkCache()->remove(url()); + if (d->outgoingDataBuffer) delete d->outgoingDataBuffer; } -- cgit v0.12