|
-
March 17th, 2011, 02:30 PM
#1
Singleton in Design Pattern
Hi,
I read the Singleton in the book << Design Patterns - Elements of Reusable Object-Oriented Software>>.
The Singleton class is define as :
class Singleton {
public:
static Singleton* Instance();
protect:
Singleton();
private:
static Singleton* _instance;
};
My question is why it uses protected constructor instead of private. Does it care about inheritance?
Any suggestion is welcomed.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|