1

Closed

Memory Leak with Json.NET

description

Hi, i profiled my application with JustTrace and filter to JustMyType to only see my type and i see a lot of instance that are not freed :

Newtonsoft.Json.Serialization.JsonPropertyCollection
Newtonsoft.Json.Serialization.JsonProperty
Newtonsoft.Json.Serialization.DynamicValueProvider

The more i serialize, the more those instances grow.


Kind Regards
Closed Jan 5, 2013 at 10:33 AM by JamesNK

comments

JamesNK wrote Dec 28, 2012 at 10:32 AM

You aren't doing something like create a new DefaultContractResolver every time?

Can you recreate the leak in a simple demo and upload it here? A lot of people use Json.NET and no one else has ever reported it having a memory leak so I need to know what you are doing that creates it.