views:

28

answers:

1

I am interested to know what happens with unused properties of a class when an object is instantiated?

Are there performance hits for having additional unused properties? What about complex properties that are accessing the database, but I'm not using them, are they still being loaded?

A: 

Yes, they are still in memory with default values for the types. Any property sets called will increase memory usage on reference types, whether get is called or not.

DaveB