iOS.Xamarin中的内存管理问题

时间:2016-07-13 10:41:04

标签: xamarin.ios

在弹出页面时,该页面只包含来自页面的按钮,该页面包含带有处理方法的后退按钮,我将释放设计师的消耗内存。

partial class detailclass:UIViewController
{
public async override void ViewDidLoad()
{
base.ViewDidLoad();
back.TouchUpInside-=Back_TouchUpInside;
back.TouchUpInside+=Back_TouchUpInside;
}
public override void ViewWillDisappera(Boolean animated)
{
base.ViewWillDisappear(animated);
Dispose();
}
void Back_TouchUpInside(object sender,EventArgs e)
{
this.NavigationController.PopToRootViewController(true);
}
protected override void Dispose()
{
 this.ReleaseDesignerOutlets();
}

0 个答案:

没有答案