What happens with Unused Class Properties
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开发者_StackOverflow are accessing the database, but I'm not using them, are they still being loaded?
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.
精彩评论