[Webkit-unassigned] [Bug 39973] Memory Leak: The main resource of page is not free.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 1 11:56:27 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=39973


Xan Lopez <xan.lopez at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |xan.lopez at gmail.com




--- Comment #1 from Xan Lopez <xan.lopez at gmail.com>  2010-06-01 11:56:27 PST ---
(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?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list