VS, C# latest beta
Had not idea how to name title properly, but this piece of code will explain all. If variable is initialized in class directly, then UIViewController memory is not released when view is popped out and dealloc
is not called. Any new push view called cause memory grown. Best to add mapview to view, to reproduce
namespace myNameSpace
{
[IBObject]
public class test: UIViewController
{
private bool myBoolVariable; // this is okay
private bool myBoolVariable2 = true; // this cause no memory release
public override void viewDidLoad()
{
base.viewDidLoad();
return;
}
public override void didReceiveMemoryWarning()
{
base.didReceiveMemoryWarning();
// Dispose of any resources that can be recreated.
}
}
}
[EDIT]
Same problem if variable is declared as readonly
private readonly long Btn_on = 0xFF3F3D3E;
workaround (but can be modified):
private static long Btn_on = 0xFF3F3D3E;
b.r.