[mono-android] problem deploying 4.2.2
Jonathan Pryor
jonp at xamarin.com
Thu Jun 14 15:59:28 UTC 2012
On Jun 11, 2012, at 5:10 PM, Sayed Arian Kooshesh wrote:
> btw
> i said
> STATIC CONSTRUCTOR ;)
Yeah, and creating an instance will cause the static constructor to execute (~by definition), especially considering that the instance constructor doesn't do anything:
https://github.com/mono/mono/blob/master/mcs/class/System.Web/System.Web/HttpUtility.cs#L69
> On Mon, Jun 11, 2012 at 4:10 PM, Sayed Arian Kooshesh
> <kooshesh at gmail.com> wrote:
>> try parsing a query string
Fine; if I change Foo() to be:
static void Foo ()
{
var ignore = System.Web.HttpUtility.UrlDecode ("http://example.com?a=b+c&d=%20e");
Console.WriteLine ("ignore={0}", ignore);
}
My final memory use is ~unchanged: diff=26784.
My point remains: execution of the HttpUtility static constructor does _not_ cause "a whole meg of memory to vanish." At best it's ~26kb, and considering that most of that is probably a giant lookup table for HTML entities, that doesn't seem all that bad to me:
https://github.com/mono/mono/blob/mono-2-10/mcs/class/System.Web/System.Web.Util/HttpEncoder.cs#L597
- Jon
More information about the Monodroid
mailing list