Last active
April 24, 2017 15:58
-
-
Save sh0seo/d3af3c1d078eba11a14d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
#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