Pup
Pup

Reputation: 10516

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 there, does this impact performance or use a significant amount of memory?

Upvotes: 0

Views: 44

Answers (1)

aav
aav

Reputation: 2489

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.

Upvotes: 1

Related Questions