Welcome to my Flyweight Design Pattern Tutorial! The flyweight design pattern is used to dramatically increase the speed of your code when you are using many similar objects.
To reduce memory usage the flyweight design pattern shares Objects that are the same rather than creating new ones. In this tutorial, I’ll create 100,000 rectangles and show you the difference in speed versus creating unique rectangle objects versus the flyweight design. The code follows to help you learn.
If you like videos like this it helps to tell Google [googleplusone]
Share if you know anyone who would be interested [nttfblike]
Code from the Video
FLYWEIGHTTEST.JAVA
MYRECT.JAVA
RECTFACTORY.JAVA
Very nice tutorials. Thanks you!
You’re very welcome 🙂
thank you so much for taking the time doing this
You’re very welcome 🙂 Thank you for taking the time to show your appreciation!
Great job! You are my on-line teacher now.
Thank you 🙂
You’re awesome! Thanks to you I may have a chance to pass my final exam!
Thank you 🙂 I wish you the best on your exam.