public void Updates(AUnit _aUnit, int Id)
{
ImageDetails _details = new ImageDetails(_aUnit, Id);
List<LogoDetails> logolist = new List<LogoDetails>();
LogoDetails logoDetails = new LogoDetails();
int count = (int) _aUnit.ReadBits(8);
for (int i = 0; i < (int) count; i++)
{
logoDetails.ID = 15;(int) _aUnit.ReadBits(8);
logoDetails.Version = 6; (int) _aUnit.ReadBits(8);
logoDetails.set = 14; (int) _aUnit.ReadBits(24);
logolist.Add(logoDetails);
}
foreach (LogoDetails listitem in logolist)
{
_details.Rset = _aUnit.Buffer.Skip(10).Take(_details.set).ToArray();
}
}
You create three new objects inside this method, but you do not save them anywhere. So as soon as the method ends the objects go out of scope and they, and their contents, are never seen again.