Let's assume we have a class that has many methods for performing many complex operations and many fields / properties. Call it "ComplexClass". Also consider "SimpleClass" which only has fields/properties, and "SimpleClassController", which has all the methods needed by "SimpleClass".
What is more efficient in terms of memory footprint? A collection of "ComplexClass" objects, or a collection of "SimpleClass" and a single "SimpleClassController"
I was pulled up in a code review today for this reason, with the justification that the memory footprint for a collection of "ComplexClass" would be much greater that having a collection "SimpleClass" with "SimpleClassController".
In the old days I might have said somehting like "yes but wouldn't all the objects would share a common code segment but have separate data segments?". At 4:40pm, my brain just wouldn't work fast enough :D