class final
{
private:
  final() {}

public:
  static final * instance();
  ~final() {}
};

final * final::instance()
{
  final * ptr = new final();
  return ptr;
}

int main (void)
{
  final *ptr = final::instance();
  delete ptr;
  return 0;
}