As per the GOF definition for "Flyweight", reuse\share similar kind of objects to reduce the memory growth.
If this is the case, java string object does the same right by using string constant pool. Then can we say that, Java String implements the Flyweight design pattern? If no why?
Aucun commentaire:
Enregistrer un commentaire