REGRESSION (r103859): WKViews leak
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Jan 2012 21:44:52 +0000 (21:44 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Jan 2012 21:44:52 +0000 (21:44 +0000)
commitc02572b503c42c80f9457243564a7cebd3ef4df4
tree1a86e7b000b4e9bf8b1d75c9b0d279b7c5f0ac9c
parenta2b25f77da2ca328f6aaa9b8b6e25eb0918710c7
REGRESSION (r103859): WKViews leak
https://bugs.webkit.org/show_bug.cgi?id=75805

The flags changed event monitor added in r103859 was retaining the WKView (as it references
self in the handler block), causing it to leak.

* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]): Moved call to remove the flags changed event monitor from here...
(-[WKView viewDidMoveToWindow]): ...to here. Moved call to add the flags changed event
monitor to here from...
(-[WKView initWithFrame:contextRef:pageGroupRef:]): ...here.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@104409 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.mm