I am using custom renderer in my xamarin.forms project. But i am facing performance issue on android platform. I need to know why DeConstructor or Dispose not calling when the page is destroyed. But constructor is calling when page(contains extendedButton) is created. Anyone have any idea why this is not calling.
public class ExtendedButtonRenderer : ButtonRenderer
{
public ExtendedButtonRenderer ()
{
Console.WriteLine ("Constructor");
}
~ExtendedButtonRenderer ()
{
Console.WriteLine ("DeConstructor");
}
protected override void Dispose (bool disposing)
{
Console.WriteLine ("Dispose");
base.Dispose (disposing);
}
protected override void OnElementChanged (ElementChangedEventArgs<Button> e)
{
base.OnElementChanged (e);
}
}