示例:
var image = UIImage.FromFile("/path/to/image.png");
var imageView = new UIImageView();
imageView.Image = image;
image.Dispose();
来自UIImageView的本机引用是否会使底层本机映像保持活动状态,或者迟早会崩溃,因为本机映像实际上已经死了?
更新
void Foo()
{
var image = UIImage.FromFile("/path/to/image.png");
this.imageView = new UIImageView();
this.imageView.Image = image;
}
这会泄漏基础原生图像吗?
答案 0 :(得分:3)