--- src/LyX.cpp | 5 +---- src/LyX.h | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/LyX.cpp b/src/LyX.cpp index 722f040..03caff3 100644 --- a/src/LyX.cpp +++ b/src/LyX.cpp @@ -64,7 +64,6 @@ #include "support/Systemcall.h" #include "support/bind.h" -#include <boost/scoped_ptr.hpp> #include <algorithm> #include <iostream> @@ -217,7 +216,6 @@ frontend::Application * theApp() LyX::~LyX() { - delete pimpl_; singleton_ = 0; WordList::cleanupWordLists(); } @@ -244,10 +242,9 @@ void lyx_exit(int exit_code) LyX::LyX() - : first_start(false) + : pimpl_(new Impl), first_start(false) { singleton_ = this; - pimpl_ = new Impl; } diff --git a/src/LyX.h b/src/LyX.h index 70b8b7e..97c9b4a 100644 --- a/src/LyX.h +++ b/src/LyX.h @@ -16,6 +16,7 @@ #include "support/strfwd.h" +#include <boost/scoped_ptr.hpp> #include <vector> namespace lyx { @@ -126,7 +127,7 @@ private: /// Use the Pimpl idiom to hide the internals. // Mostly used for singletons. struct Impl; - Impl * pimpl_; + boost::scoped_ptr<struct Impl> pimpl_; /// has this user started lyx for the first time? bool first_start; -- 1.8.0.rc3.16.g8ead1bf