I have a static list
List<Tuple<string, string>> binariesList = new List<Tuple<string, string>>()
in an static class called Class1
.
The non-static class Class2
use Class1
a lot of times. Instances of Class2
are constructed often, I think there is no problem with that (Garbage Collcetor collects it).
But just at start of program, Class1
loads a file of about 2 MB into binariesList
.
In the static load()
method I use this for loading for each element:
dic.Add(new Tuple<string,string>(temp[i].Split(',')[1].Trim(), temp[i].Split(',')[0].Trim()));
I have a memory problem and saw there is a high reference count and size(bytes) columns, in the memory dump I analyze for that Tuple<string,string>
.
Is there a problem with that Tuple<string,string>
?