Updated: October 17, 2013
Published: April 1, 2014
You must call this function when you programmatically remove the AdControl from a page. This function will do the required cleanup given there are no event handlers registered.
Set this value to true to try and have the AdControl remove all event handlers before disposal.
The default value of this parameter is false.
Attempting to dispose when there are event handlers still registered will throw an exception.
The dispose function will do required cleanup of the AdControl for those users who remove it using code.
Most developers will NOT have reason to remove the AdControl, but if you do, you must call this API beforehand.
DO NOT remove the remove your div container from the DOM prior to calling dispose.
Support and Feedback
Get product support or report a bug in the advertising SDK by visiting the Windows Store Apps developer support page support page. For product support, under "App development" click the "Advertising SDK" link. To post a question in the support forum, scroll down to "Find answers online" and click "Ads-in-Apps for Windows 8 forum".
Send feedback about this documentation to firstname.lastname@example.org. There is no product support through this alias. Documentation feedback only.