Scala, Scala Programming, Programming, Design Patterns, Singleton Design Pattern.
factory method for obtaining the delegator whose behavior is implemented by the delegate. A destroy method to the new delegate can be added to the factory the same way as with the previous delegates. This can be performed without affecting client code improving extendibility. An example of an