The two pattern seems to achieve the same thing. What are the different use cases in real world? Thanks
Don't forget that singleton is a creational pattern, while flyweight is a structural pattern. Hence, the goal of the two patterns is completely different