On Thu, Sep 24, 2009 at 5:14 PM, Michael Nordman <micha...@google.com>wrote:
> I think there may be more than one code path to CachedResource removal. > 1. See DocLoader. It has a DocumentResourceMap that contains cached > resources that have been loaded for its Document. The collection gets poked > at in the ~DocLoader to clean things up. > > 2. During CacheResource validation. See > CachedResource.clearResourceToRevalidate and deleteIfPossible. > > Thanks Mike, I've identified the problem :-) The Cache object is a singleton that never gets deleted, so any CachedResource objects in the Cache will be leaked (inCache returns true in deleteIfPossible) by both test_shell and chromium when the renderer exits. It's possible to force deletion of everything in the cache by calling: WebCore::cache()->setDisabled(true); Would it be useful to do this when test_shell and the renderer process exits or is it better to just let these objects leak? Thanks, Marshall > > On Thu, Sep 24, 2009 at 1:35 PM, Marshall Greenblatt < > magreenbl...@gmail.com> wrote: > >> Hi All, >> >> I'm trying to debug the leak of CachedResource objects in test_shell. >> Every time I browse to a page that contains an image or CSS file a new >> CachedResource object is created in Cache.cpp createResource(). However, >> none of these objects are ever freed. Does anyone happen to know where/how >> the CachedResource objects should be freed so that I can figure out why >> they're getting lost? >> >> Thanks, >> Marshall >> >> >> >> > --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---