|
-
October 28th, 2009, 08:34 AM
#1
Struct within a class... on stack?
Hey,
Just want to confirm something... if i have a struct, lets say a point within a class. Would that point live within the stack, even though the class is a reference type...
Im pretty sure that it would live in the stack whereas everything else would point to the heap... im basically looking at turning a class that gets created and deleted ALOT into a struct, to improve performance, it would be about 16 bytes in size (4xuint) so it *sounds* like a good idea.
Although a few other things that may interfere with my idea ...
- They are all contained within a class
- They *may* need to implement from an interface, although it is rarely called as its interface type
- They *may* need to contain a few simple methods
Anyone think its worth it and if there are any problems from my given info?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|