]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/GraphicsLoader.cpp
only called once
[lyx.git] / src / graphics / GraphicsLoader.cpp
index e175ba5c754dda37aa10b46cad2b29cd0ee6f32b..a7ac094cd2e69690deafb0c776e15504b89a1ab7 100644 (file)
@@ -17,8 +17,6 @@
 #include "GraphicsParams.h"
 #include "LoaderQueue.h"
 
-#include "callback.h"
-
 #include <boost/bind.hpp>
 
 
@@ -31,6 +29,8 @@ using support::FileName;
 
 namespace graphics {
 
+typedef boost::shared_ptr<Image> ImagePtr;
+
 class Loader::Impl : public boost::signals::trackable {
 public:
        ///
@@ -55,7 +55,7 @@ public:
         */
        Cache::ItemPtr cached_item_;
        /// We modify a local copy of the image once it is loaded.
-       Image::ImagePtr image_;
+       ImagePtr image_;
        /// This signal is emitted when the image loading status changes.
        boost::signal<void()> signal_;
        /// The connection of the signal StatusChanged  
@@ -100,7 +100,9 @@ Loader::Loader(Loader const & other)
 
 
 Loader::~Loader()
-{}
+{
+       delete pimpl_;
+}
 
 
 Loader & Loader::operator=(Loader const & other)
@@ -208,8 +210,7 @@ Loader::Impl::Impl()
 
 Loader::Impl::~Impl()
 {
-       if (!quitting)
-               resetFile(FileName());
+       resetFile(FileName());
 }