The leak is happen in ./WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp: void FrameLoadedrClient::dispatchDidFinishLoading(...) if(!coreResource) coreResource = loader->mainResource().releaseRef(); should be as following: if(!coreResource) coreResource = loader->mainResource(); Otherwise, the reference count of coreResource is 2 at this point. And the main resource will not freed in this case.
(In reply to comment #0) > The leak is happen in ./WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp: > void FrameLoadedrClient::dispatchDidFinishLoading(...) > > if(!coreResource) > coreResource = loader->mainResource().releaseRef(); > > should be as following: > > if(!coreResource) > coreResource = loader->mainResource(); > > Otherwise, the reference count of coreResource is 2 at this point. And the main resource will not freed in this case. If I recall the refptr stuff correctly, I think this is right. The object is created with 1 reference, then it's increased to 2 for the return value. As we leak the ref with releaseRef(), it's never decreased to 1 when assigned. Is this what you had in mind?
Pushed as r60498