vendredi 24 août 2018

How big should a flyweight object be?

I was reading a book on design patterns and the flyweight design pattern was used to store chars in a text editor. There was written that with large number of objects it saves space, but I don't see how. I mean, the pointer is 4 bytes and a char is 1 byte so how would it save any space?

Aucun commentaire:

Enregistrer un commentaire