-
mitz@apple.com authored
Reviewed by Sam Weinig. - WebCore part of https://bugs.webkit.org/show_bug.cgi?id=21736 Long-dead decoded image data make up for most of the object cache's memory use over time Add a cache setting for how long decoded image data should be allowed to persist in memory after the image has died. By default, this is set to 0, which means "forever". * loader/Cache.cpp: (WebCore::Cache::Cache): Initialize m_deadDecodedDataDeletionInterval. * loader/Cache.h: (WebCore::Cache::setDeadDecodedDataDeletionInterval): Added a setter. (WebCore::Cache::deadDecodedDataDeletionInterval): Added a getter. * loader/CachedImage.cpp: (WebCore::CachedImage::CachedImage): Initialize the decoded data deletion timer. (WebCore::CachedImage::decodedDataDeletionTimerFired): Added. Destroys the decoded image data. (WebCore::CachedImage::addClient): Stop the timer if it is active. (WebCore::CachedImage::allClientsRemoved): Start the decoded data deletion timer. * loader/CachedImage.h: WebKit/mac: Reviewed by Sam Weinig. - WebKit/mac part of https://bugs.webkit.org/show_bug.cgi?id=21736 Long-dead decoded image data make up for most of the object cache's memory use over time * WebView/WebView.mm: (+[WebView _setCacheModel:]): In the primary web browser model, set the cache's dead decoded data deletion interval to 60 seconds. WebKit/win: 2008-10-18 Dan Bernstein <mitz@apple.com> Reviewed by Sam Weinig. - WebKit/win part of https://bugs.webkit.org/show_bug.cgi?id=21736 Long-dead decoded image data make up for most of the object cache's memory use over time * WebView.cpp: (WebView::setCacheModel): In the primary web browser model, set the cache's dead decoded data deletion interval to 60 seconds. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
3076b4b5