title: Disposable custom controls in Xamarin.Forms/MAUI
body: <p>Many tutorials and guides suggest that when you create a custom control in Xamarin.Forms or .NET MAUI with a <code>ContentView</code> (or extending another view), it should implement <code>IDisposable</code> interface when needed. See <a href="https://github.com/jsuarezruiz/ways-create-netmaui-controls#3-using-contentview" rel="nofollow noreferrer">here</a> and <a href="https://xamgirl.com/tips-and-ticks-when-creating-a-custom-control-in-xamarin-forms-part-1/" rel="nofollow noreferrer">here</a>.</p>
  <p>That can be useful, as far as i can see, to unsubscribe from events.</p>
  <p>My question is: when is <code>Dispose()</code> called?</p>
  <p>I tried some scenarios in Xamarin.Forms involving moving from the page where the custom view lies and removing that page from the navigation stack, but none of these actions called the <code>Dispose()</code> method.
  Do I have to call it manually?</p>