[Webkit-unassigned] [Bug 75984] QWebView leaks memory when QObject signal is connected to javascript slot

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 23 09:46:51 PDT 2013


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


Robert Knight <robertknight at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |robertknight at gmail.com




--- Comment #8 from Robert Knight <robertknight at gmail.com>  2013-04-23 09:45:10 PST ---
Confirmed with Qt 4.8 on Mac.

I can suggest a couple of possible workarounds:

 1. The connections from Qt objects to JS functions are proxied via a hidden QObject which inherits from 'JSC::Bindings::QtConnectionObject'.  Finding these objects via QObject::children() and deleting them will remove the connection.

 2. Instead of calling object.signal.connect() directly, use a wrapper which performs the connection and saves the (method, receiver) somewhere and add a document unload handler which removes these connections.

Something like: https://gist.github.com/robertknight/5445289

I haven't tested this extensively.

-- 
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