开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜