G
Guest
What the size of an object when it is instantiated to null?
I am placing a number of strongly typed objects into a collection. I want to keep the amount of memory that is utilized by each the objects to a minimum. Each object contains a field that is a reference type. I am trying to decide whether or not to instantiate this reference type when the object is first created.
How is memory allocated with a new object versus an object that set to null? If it matters, I am using C#.
Thanks,
Mark
I am placing a number of strongly typed objects into a collection. I want to keep the amount of memory that is utilized by each the objects to a minimum. Each object contains a field that is a reference type. I am trying to decide whether or not to instantiate this reference type when the object is first created.
How is memory allocated with a new object versus an object that set to null? If it matters, I am using C#.
Thanks,
Mark