Closed Bug 1164486 Opened 10 years ago Closed 10 years ago

Application is leaking Browser instances

Categories

(Firefox for iOS :: General, defect)

Other
iOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fennec + ---

People

(Reporter: st3fan, Assigned: bnicholson)

References

Details

(Keywords: perf)

Attachments

(1 file)

I added a a deinit to Browser: deinit { println("Hi! I am deinit!") } But it is never called. Which means we are leaking Browser instances and thus also WKWebView instances.
Summary: Leaking Browser instances → Applicaiton is leaking Browser instances
Summary: Applicaiton is leaking Browser instances → Application is leaking Browser instances
I think the actual problem is that we are holding a reference to the Browser.webView somewhere. The Browser is a WKScriptMessageHandler so it's WKWebView has a reference to Browser. That is fine because the webview is released when the Browser is released. But! If something outside of Browser is keeping a reference to the WKWebView then that release will not happen.
Keywords: perf
This also contributes to the startup time I think, according to WebKit bug https://bugs.webkit.org/show_bug.cgi?id=142583
WKScriptMessage.initWithBody:webView:frameInfo:name leaks an NSDictionary each time we open a new tab. I can't see what's in that dict, but perhaps it's the WKSMH…
tracking-fennec: ? → +
Assignee: nobody → bnicholson
Status: NEW → ASSIGNED
No longer blocks: iosstartuptime
Attachment #8612625 - Flags: review?(sarentz) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: