본문 바로가기

Dev/C++

unique_ptr로 Pimpl idiom 구현시 소멸자의 필요성

블로그 이전 되었습니다. :)

https://gomgomi.github.io/cpp/pimpl-with-uniqueptr/

 

unique_ptr로 Pimpl idiom 구현시 소멸자의 필요성

Pimpl idiom을 사용하여 클래스를 아래와 같은 형태로 작성을 했다. ``` c++ // header class Controller { public: Controller(); private: class ControllerImpl; std::unique_ptr d; };

gomgomi.github.io