Below you will find pages that utilize the taxonomy term “flyweight”
December 16, 2017
Golang flyweight pattern
The flyweight pattern is a design pattern I am not seeing that often in code bases but can be a good design pattern to reduce memory. The core idea is to initialize objects an share them as often as possible for reuse. Mostly the flyweight pattern can be seen in desktop UI implementation (GUI). In Java Swing, for instance, the JTable rendering uses this pattern, to reduce the computation needed for painting.