I'm studying patterns and I have a doubt with the Prototype pattern (composition of objects) and memory footprint.
This pattern is a possible solution to the lack of multiple inheritance in Java, but lets suppose for a moment that Java has multiple inheritance.
Is using the implementation of an interface in the Prototype pattern, more efficient than doing multiple inheritance for the memory?
Is doing an "extends" on a subclass, the same in terms of memory footprint as instantiating a new object on that subclass?
Aucun commentaire:
Enregistrer un commentaire