diff options
| author | Eleni Maria Stea <elenimaria.stea@canonical.com> | 2013-11-06 13:21:43 +0200 |
|---|---|---|
| committer | Eleni Maria Stea <elenimaria.stea@canonical.com> | 2013-11-06 13:21:43 +0200 |
| commit | 4d2d8087bd51d756038a16fb5de282d9a5f5ec38 (patch) | |
| tree | 9a78a27f6abc26b43a1d97adc8957e06f37faf40 /unity-shared | |
| parent | 6810fd1d785bb8f08a29421dc6cf2e7ad0cb05e8 (diff) | |
added virtual destructors in classes that have virtual methods
to prevent future memory leaks (bzr r3587.4.1)
Diffstat (limited to 'unity-shared')
| -rw-r--r-- | unity-shared/DefaultThumbnailProvider.cpp | 1 | ||||
| -rw-r--r-- | unity-shared/IMTextEntry.h | 1 | ||||
| -rw-r--r-- | unity-shared/IconTextureSource.h | 1 | ||||
| -rw-r--r-- | unity-shared/MockableBaseWindow.h | 1 | ||||
| -rw-r--r-- | unity-shared/PlacesOverlayVScrollBar.h | 1 | ||||
| -rw-r--r-- | unity-shared/PlacesVScrollBar.h | 2 | ||||
| -rw-r--r-- | unity-shared/ResizingBaseWindow.h | 2 | ||||
| -rw-r--r-- | unity-shared/TextureThumbnailProvider.cpp | 1 | ||||
| -rw-r--r-- | unity-shared/ThumbnailGenerator.h | 2 | ||||
| -rw-r--r-- | unity-shared/UserThumbnailProvider.cpp | 1 | ||||
| -rw-r--r-- | unity-shared/VScrollBarOverlayWindow.h | 1 |
11 files changed, 13 insertions, 1 deletions
diff --git a/unity-shared/DefaultThumbnailProvider.cpp b/unity-shared/DefaultThumbnailProvider.cpp index 7545b21e5..5d16b4744 100644 --- a/unity-shared/DefaultThumbnailProvider.cpp +++ b/unity-shared/DefaultThumbnailProvider.cpp @@ -36,6 +36,7 @@ public: DefaultThumbnailer(std::string const& name) : name(name) {} + virtual ~DefaultThumbnailer() {} std::string name; diff --git a/unity-shared/IMTextEntry.h b/unity-shared/IMTextEntry.h index b39b37b85..086b23e51 100644 --- a/unity-shared/IMTextEntry.h +++ b/unity-shared/IMTextEntry.h @@ -32,6 +32,7 @@ class IMTextEntry : public nux::TextEntry NUX_DECLARE_OBJECT_TYPE(IMTextEntry, nux::TextEntry); public: IMTextEntry(); + virtual ~IMTextEntry() {} bool im_preedit(); protected: diff --git a/unity-shared/IconTextureSource.h b/unity-shared/IconTextureSource.h index 9388c979a..2a81c0902 100644 --- a/unity-shared/IconTextureSource.h +++ b/unity-shared/IconTextureSource.h @@ -46,6 +46,7 @@ public: }; IconTextureSource(); + virtual ~IconTextureSource() {} std::vector<nux::Vector4> & GetTransform(TransformIndex index, int monitor); diff --git a/unity-shared/MockableBaseWindow.h b/unity-shared/MockableBaseWindow.h index fb52eef06..3fa051b12 100644 --- a/unity-shared/MockableBaseWindow.h +++ b/unity-shared/MockableBaseWindow.h @@ -37,6 +37,7 @@ public: : nux::BaseWindow(window_name, NUX_TRACKER_LOCATION) , struts_enabled_(false) {} + virtual ~MockableBaseWindow() {} /** * Sets the window opacity. diff --git a/unity-shared/PlacesOverlayVScrollBar.h b/unity-shared/PlacesOverlayVScrollBar.h index a32e4f18a..b9697ef47 100644 --- a/unity-shared/PlacesOverlayVScrollBar.h +++ b/unity-shared/PlacesOverlayVScrollBar.h @@ -38,6 +38,7 @@ class PlacesOverlayVScrollBar: public PlacesVScrollBar { public: PlacesOverlayVScrollBar(NUX_FILE_LINE_PROTO); + virtual ~PlacesOverlayVScrollBar() {} protected: void Draw(nux::GraphicsEngine& graphics_engine, bool force_draw); diff --git a/unity-shared/PlacesVScrollBar.h b/unity-shared/PlacesVScrollBar.h index 87f793ea9..c6bc201cb 100644 --- a/unity-shared/PlacesVScrollBar.h +++ b/unity-shared/PlacesVScrollBar.h @@ -36,7 +36,7 @@ class PlacesVScrollBar : public nux::VScrollBar { public: PlacesVScrollBar(NUX_FILE_LINE_PROTO); - ~PlacesVScrollBar(); + virtual ~PlacesVScrollBar(); protected: virtual void PreLayoutManagement(); diff --git a/unity-shared/ResizingBaseWindow.h b/unity-shared/ResizingBaseWindow.h index 3d9080133..75d3721c7 100644 --- a/unity-shared/ResizingBaseWindow.h +++ b/unity-shared/ResizingBaseWindow.h @@ -50,6 +50,8 @@ public: ResizingBaseWindow(char const* window_name, GeometryAdjuster const& input_adjustment); + virtual ~ResizingBaseWindow() {} + /** * Recalculates the input window geometry. * diff --git a/unity-shared/TextureThumbnailProvider.cpp b/unity-shared/TextureThumbnailProvider.cpp index 128daf8bf..0cfbc55e2 100644 --- a/unity-shared/TextureThumbnailProvider.cpp +++ b/unity-shared/TextureThumbnailProvider.cpp @@ -36,6 +36,7 @@ public: GdkTextureThumbnailer(std::string const& name) : name(name) {} + virtual ~GdkTextureThumbnailer() {} std::string name; diff --git a/unity-shared/ThumbnailGenerator.h b/unity-shared/ThumbnailGenerator.h index 387620945..b717216f8 100644 --- a/unity-shared/ThumbnailGenerator.h +++ b/unity-shared/ThumbnailGenerator.h @@ -33,6 +33,8 @@ class Thumbnailer public: typedef std::shared_ptr<Thumbnailer> Ptr; + virtual ~Thumbnailer() {} + virtual std::string GetName() const = 0; virtual bool Run(int size, std::string const& input_file, std::string& output_file, std::string& error_hint) = 0; diff --git a/unity-shared/UserThumbnailProvider.cpp b/unity-shared/UserThumbnailProvider.cpp index 2b8511480..5e4de6fa4 100644 --- a/unity-shared/UserThumbnailProvider.cpp +++ b/unity-shared/UserThumbnailProvider.cpp @@ -37,6 +37,7 @@ public: : name(name) , command_line(command_line) {} + virtual ~UserThumbnailer() {} std::string name; std::string command_line; diff --git a/unity-shared/VScrollBarOverlayWindow.h b/unity-shared/VScrollBarOverlayWindow.h index 7dfc15d0b..ce78e8c14 100644 --- a/unity-shared/VScrollBarOverlayWindow.h +++ b/unity-shared/VScrollBarOverlayWindow.h @@ -32,6 +32,7 @@ class VScrollBarOverlayWindow : public nux::BaseWindow { public: VScrollBarOverlayWindow(nux::Geometry const& geo); + virtual ~VScrollBarOverlayWindow() {} void UpdateGeometry(nux::Geometry const& geo); void SetThumbOffsetY(int y); |
