In C# if i use the following code
Dictionary<int,object> dictionary = new Dictionary<int, object>();
dictionary.Add(1,null);
dictionary.Add(2,new object());
dictionary[2] = null;
How much memory is being allocated? does each object reference in the dictionary (dictionary[1], dictionary[2]) takes a pointer size (32 or 64 bit) on the heap? in other words when i do dictionary.Add(1,null) does the CLR automatically create 2 allocations on the heap, one for the int and one for a null pointer?