otbTestUniquePtr.cpp 224 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <iostream>
#include <memory>

struct Foo
{
  Foo() { std::cout << "Constructor\n"; }
  ~Foo() { std::cout << "Destructor\n"; }
};

int main(int argc, char *argv[])
{
  std::unique_ptr<Foo> p(new Foo);
  return 0;
}