Closed
Bug 1164486
Opened 10 years ago
Closed 10 years ago
Application is leaking Browser instances
Categories
(Firefox for iOS :: General, defect)
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.
Reporter | ||
Updated•10 years ago
|
Summary: Leaking Browser instances → Applicaiton is leaking Browser instances
Reporter | ||
Updated•10 years ago
|
Summary: Applicaiton is leaking Browser instances → Application is leaking Browser instances
Reporter | ||
Comment 1•10 years ago
|
||
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.
Reporter | ||
Comment 2•10 years ago
|
||
This also contributes to the startup time I think, according to WebKit bug https://bugs.webkit.org/show_bug.cgi?id=142583
Comment 3•10 years ago
|
||
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…
Updated•10 years ago
|
Blocks: iosstartuptime
tracking-fennec: ? → +
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → bnicholson
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8612625 -
Flags: review?(sarentz)
Assignee | ||
Updated•10 years ago
|
No longer blocks: iosstartuptime
Reporter | ||
Comment 5•10 years ago
|
||
Comment on attachment 8612625 [details] [review]
Link to Github pull-request: https://github.com/mozilla/firefox-ios/pull/521
Great fix.
Attachment #8612625 -
Flags: review?(sarentz) → review+
Assignee | ||
Comment 6•10 years ago
|
||
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.
Description
•