[mono-android] problem deploying 4.2.2
Jonathan Pryor
jonp at xamarin.com
Mon Jun 11 21:07:31 UTC 2012
On Jun 11, 2012, at 1:00 PM, Sayed Arian Kooshesh wrote:
> You should also never use httputility as the static constructor causes a whole meg of memory to vainsh.
How pray-tell did you come to this conclusion? My (really stupid) test shows that it only uses 26k:
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
GC.Collect ();
var start = GC.GetTotalMemory (false);
Console.WriteLine ("Start memory: {0}", start);
Foo ();
GC.Collect ();
var end = GC.GetTotalMemory (false);
Console.WriteLine ("End memory: {0}; diff={1}", end, (end-start).ToString ());
}
static void Foo ()
{
var ignore = new System.Web.HttpUtility ();
}
The memory diff is 26520, which is a far cry from 1MB...
- Jon
More information about the Monodroid
mailing list