hey, hi i want put limit on object creation means a class can have at most suppose 4 objects not more than that how to achieve this?
One approach is using an object factory that creates at most 4 instances. It's an interesting need... Would an object pool serve the same need?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With