I have the following nested dictionaries:
Dictionary<int, Dictionary<string, object>> x;
Dictionary<int, SortedDictionary<long, Dictionary<string, object>>> y;
If I do x.Clear()
and y.Clear()
will all the nested objects clear and all the memory will be reused on the next garbage collection?
Or do I need to iterate on all the items and clear them manually?