P
Pete Vidler
Pete Vidler wrote:
[snip]
That Create method was meant to be static, obviously.
-- Pete
[snip]
class SafeClass
{
public:
typedef boost::shared_ptr< SafeClass > Ptr;
// Might need a static_cast here, I don't remember exactly.
Ptr Create() { return new SafeClass; }
That Create method was meant to be static, obviously.
private:
SafeClass() { ... }
};
// This should be the only way to create a SafeClass object:
SafeClass:tr safeClass1 = SafeClass::Create();
-- Pete