3 ms·
OK, I am not even sure anymore what the singleton pattern is _(it's been a while). If it is the class constructor that makes sure you can only ever create one i
by Tichy 19y ago
OK, I am not even sure anymore what the singleton pattern is _(it's been a while). If it is the class constructor that makes sure you can only ever create one instance, it might be bad. I thought any mechanism for ensuring singleness would qualify for the pattern. Then you examples wouldn't invalidate the connection pool, you could just have to different pools, one for each database. I agree that with the "class instantiation implementation" you could probably not do that.
- bayareaguy 19y agohttp://c2.com/cgi-bin/wiki?SingletonPattern http://c2.com/cgi-bin/wiki?SingletonPattern has some good discussion on it.