Tag: cycle
Designing a Multiton: Singleton that returns 5 objects in cycle
Let’s Design a Multiton class i.e. a modified Singleton to return 5 objects in cycle. Logic to Create Multiton Advertisements Instead of keeping a static pointer as member variable keep a vector of pointers as member variable. Now also keep track of how many times getInstance() function is called. To do that use static member …
Designing a Multiton: Singleton that returns 5 objects in cycleRead More