This method closes a browser window which was created using the
Create method. It is recommended that you always use this method
to close the window rather than posting a WM_CLOSE message
because it ensures resources for the window, such as its icons, are
released correctly. The process of destroying the window does not occur
immediately and when this function returns it is not guaranteed the
browser child window and its associated processes have completely
stopped. Use the WaitUntilClosed method if you wish to
wait for the cleanup process to complete.
This method will cause the WEBVIEW_EVENT_WINDOW_DETACHED
event to fire as part of the normal process of destroying the window.
If you implement a handler for this event, you should never delay this
process by attempting to show a dialog or request input from the user
(for example, by displaying a message box). At the point this event is
fired, the browser objects have already been disposed and there is no
way to prevent the process from completing.
If this method is not explicitly called, the class destructor will
close the hosting window and release the resources allocated for the
browser.