{"action":"created","issue":{"url":"https://api.github.com/repos/axefrog/SimpleBrowser/issues/120","labels_url":"https://api.github.com/repos/axefrog/SimpleBrowser/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/axefrog/SimpleBrowser/issues/120/comments","events_url":"https://api.github.com/repos/axefrog/SimpleBrowser/issues/120/events","html_url":"https://github.com/axefrog/SimpleBrowser/pull/120","id":54292616,"number":120,"title":"Restore backward compatibility on ClearWindows","user":{"login":"Teun","id":493647,"avatar_url":"https://avatars.githubusercontent.com/u/493647?v=3","gravatar_id":"","url":"https://api.github.com/users/Teun","html_url":"https://github.com/Teun","followers_url":"https://api.github.com/users/Teun/followers","following_url":"https://api.github.com/users/Teun/following{/other_user}","gists_url":"https://api.github.com/users/Teun/gists{/gist_id}","starred_url":"https://api.github.com/users/Teun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Teun/subscriptions","organizations_url":"https://api.github.com/users/Teun/orgs","repos_url":"https://api.github.com/users/Teun/repos","events_url":"https://api.github.com/users/Teun/events{/privacy}","received_events_url":"https://api.github.com/users/Teun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-14T07:37:13Z","updated_at":"2015-01-20T19:16:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/axefrog/SimpleBrowser/pulls/120","html_url":"https://github.com/axefrog/SimpleBrowser/pull/120","diff_url":"https://github.com/axefrog/SimpleBrowser/pull/120.diff","patch_url":"https://github.com/axefrog/SimpleBrowser/pull/120.patch"},"body":"@kevingy  ,\r\nPlease review. If it is OK, you can pull and I will create a new version on nuget later today.\r\n\r\nReintroduced static ClearWindows\r\nHad to rename instance scoped ClearWindows to ClearWindowsInContext\r\nAdded unit tests"},"comment":{"url":"https://api.github.com/repos/axefrog/SimpleBrowser/issues/comments/70713972","html_url":"https://github.com/axefrog/SimpleBrowser/pull/120#issuecomment-70713972","issue_url":"https://api.github.com/repos/axefrog/SimpleBrowser/issues/120","id":70713972,"user":{"login":"iEmiya","id":1047575,"avatar_url":"https://avatars.githubusercontent.com/u/1047575?v=3","gravatar_id":"","url":"https://api.github.com/users/iEmiya","html_url":"https://github.com/iEmiya","followers_url":"https://api.github.com/users/iEmiya/followers","following_url":"https://api.github.com/users/iEmiya/following{/other_user}","gists_url":"https://api.github.com/users/iEmiya/gists{/gist_id}","starred_url":"https://api.github.com/users/iEmiya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iEmiya/subscriptions","organizations_url":"https://api.github.com/users/iEmiya/orgs","repos_url":"https://api.github.com/users/iEmiya/repos","events_url":"https://api.github.com/users/iEmiya/events{/privacy}","received_events_url":"https://api.github.com/users/iEmiya/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T19:16:51Z","updated_at":"2015-01-20T19:16:51Z","body":"A simple test for memory leaks. \r\n```csharp\r\n\r\n        [Test]\r\n\t    public void MemoryLeak()\r\n        {\r\n            // look : exception\r\n            long? useTotalMemory = null;\r\n            var task = System.Threading.Tasks.Task.Factory.StartNew(() =>\r\n            {\r\n                long threadId = 1;\r\n                while (true)\r\n                {\r\n                    long totalMemory = GC.GetTotalMemory(false);\r\n                    Trace.WriteLine(string.Format(\"Use total memory: {0:#,##0} byte(s)\", totalMemory));\r\n                    if (threadId % 20 == 0)\r\n                    {\r\n                        if (!useTotalMemory.HasValue) useTotalMemory = totalMemory;\r\n                        else\r\n                        {\r\n                            if (totalMemory > useTotalMemory) throw new ApplicationException(\"Memory leak in 'SimpleBrowser'\");\r\n                            break; // Ok\r\n                        }\r\n                    }\r\n\r\n\r\n                    try\r\n                    {\r\n                        threadId++;\r\n                        Browser b1 = new Browser(Helper.GetFramesMock());\r\n                        b1.Navigate(\"http://localhost/\");\r\n                        if (threadId % 2 == 0) throw new ApplicationException();\r\n                        b1.Close();\r\n\r\n                        GC.WaitForPendingFinalizers();\r\n                        GC.Collect();\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n                        Trace.Fail(\"Failed to navigate\");\r\n                    }\r\n                }\r\n            });\r\n\r\n            task.Wait();\r\n        }\r\n```"}}