Posts

Es werden Posts vom Januar, 2013 angezeigt.

WebView and ARC

Another ARC related note in my blog and as I can see a problem that maybe a couple of other coders have faced as well. I am using a custom WindowController to handle a WebView and some javascript to interact with a web page. When closing the window, the window controller should get closed. Yet, its dealloc method doesn't get called. After some digging I found out that javascript calls via the windowScriptObject block the release of the web view and thus of the window controller. Setting the value for my scripting key to nil was one solution. Yet, as soon as I called javascript functions with parameters from my windows controller, the dealloc was blocked again. Loading an empty string in the mainFrame of the WebView as soon as the window will close solved that for me. So, ARC and WebView seem to play nicely together