开发者

Is memory used by an object's declared, but undefined member?

If my class has declared a

private var _iDontGetDefined:EnormousObject;

but never creates anything to be stored 开发者_JAVA技巧there, does this impact performance or use a significant amount of memory?


Such declaration will not affect performance and will have almost no impact on memory footprint.

If you want to maintain a lot of similar and optional values, you may consider using a Dictionary.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜