S
Summercool Summercool
There seems to be a big thing about the Singleton Pattern... and the way
to implement it, but what about just using class variables and class
methods to do the job?
So for example, the class Jukebox can have an object Logger... and all
the Jukebook instances will call the Logger methods which access the
class variables... isn't that what the Singleton Pattern is?
(this refers to p.35 of the pickAx2 book... about creating a class that
can do the singleton by making "new" private.)
to implement it, but what about just using class variables and class
methods to do the job?
So for example, the class Jukebox can have an object Logger... and all
the Jukebook instances will call the Logger methods which access the
class variables... isn't that what the Singleton Pattern is?
(this refers to p.35 of the pickAx2 book... about creating a class that
can do the singleton by making "new" private.)