C
Chris Dunaway
When deciding to use a structure or a class, what is the general "rule
of thumb"? When you're creating your data model, what factors
dictate that you use a class instead of a structure?
Structures are more lightweight than classes but for example if you're
only going to create a single instance (for whatever reason), it seems
that the added "weight" of a class would be negligible. If creating
many such instances, it might be different.
Is there any GC related issues when creating structures as opposed to
classes?
I'm just looking for a good rule of thumb on when to create structures
and when to create classes.
of thumb"? When you're creating your data model, what factors
dictate that you use a class instead of a structure?
Structures are more lightweight than classes but for example if you're
only going to create a single instance (for whatever reason), it seems
that the added "weight" of a class would be negligible. If creating
many such instances, it might be different.
Is there any GC related issues when creating structures as opposed to
classes?
I'm just looking for a good rule of thumb on when to create structures
and when to create classes.