Skip to content

Instantly share code, notes, and snippets.

@sh0seo
Last active April 24, 2017 15:58
Show Gist options
  • Save sh0seo/d3af3c1d078eba11a14d to your computer and use it in GitHub Desktop.
Save sh0seo/d3af3c1d078eba11a14d to your computer and use it in GitHub Desktop.
//
#ifndef Engine_h
#define Engine_h
// #include <memory>
namespace {
class Engine {
public:
Engine();
~Engine();
private:
struct Impl;
//std::unique_ptr<Impl> pImpl;
Impl *pImpl;
};
}
#endif /* Engine_h */
// .cc
#include "Engine.h"
namespace {
struct Engine::Impl {
int test();
char arr[40];
};
Engine::Engine() {
pImpl = new Impl;
}
Engine::~Engine() {
delete pImpl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment