开发者

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

开发者 https://www.devze.com 2023-02-21 18:43 出处:网络
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 memo

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

精彩评论

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