summaryrefslogtreecommitdiff
path: root/dw
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2013-06-17 12:56:47 +0200
committerSebastian Geerken <devnull@localhost>2013-06-17 12:56:47 +0200
commit8ab35cfed90977fabbc7bb5ed8036f07cbaff313 (patch)
tree2d432dbc4a7ba2a79b3c20388148dfe0eea6d28e /dw
parent13837a13a756a929d51166c1e4b822a59537ab76 (diff)
Cleanup.
Diffstat (limited to 'dw')
-rw-r--r--dw/core.hh3
-rw-r--r--dw/fltkcore.hh11
-rw-r--r--dw/fltkimgbuf.cc7
-rw-r--r--dw/fltkimgbuf.hh2
4 files changed, 23 insertions, 0 deletions
diff --git a/dw/core.hh b/dw/core.hh
index 13545bfe..f39c38cc 100644
--- a/dw/core.hh
+++ b/dw/core.hh
@@ -26,6 +26,9 @@ class View;
class Widget;
class Iterator;
+// Nothing yet to free.
+inline void freeall () { }
+
namespace ui {
class ResourceFactory;
diff --git a/dw/fltkcore.hh b/dw/fltkcore.hh
index 2a20a610..5ac619b0 100644
--- a/dw/fltkcore.hh
+++ b/dw/fltkcore.hh
@@ -20,6 +20,17 @@ class FltkResource;
#include "fltkplatform.hh"
#include "fltkui.hh"
+namespace dw {
+namespace fltk {
+
+inline void freeall ()
+{
+ FltkImgbuf::freeall ();
+}
+
+} // namespace fltk
+} // namespace dw
+
#undef __INCLUDED_FROM_DW_FLTK_CORE_HH__
#endif // __DW_FLTK_CORE_HH__
diff --git a/dw/fltkimgbuf.cc b/dw/fltkimgbuf.cc
index 7f6e2b33..d1f1c8e4 100644
--- a/dw/fltkimgbuf.cc
+++ b/dw/fltkimgbuf.cc
@@ -69,6 +69,13 @@ bool FltkImgbuf::excessiveImageDimensions (int width, int height)
width > IMAGE_MAX_AREA / height;
}
+void FltkImgbuf::freeall ()
+{
+ _MSG("Deleting gammaCorrectionTables\n");
+ delete gammaCorrectionTables;
+ gammaCorrectionTables = NULL;
+}
+
FltkImgbuf::FltkImgbuf (Type type, int width, int height, double gamma)
{
_MSG("FltkImgbuf: new root %p\n", this);
diff --git a/dw/fltkimgbuf.hh b/dw/fltkimgbuf.hh
index 81419494..ee5ae922 100644
--- a/dw/fltkimgbuf.hh
+++ b/dw/fltkimgbuf.hh
@@ -56,6 +56,8 @@ protected:
public:
FltkImgbuf (Type type, int width, int height, double gamma);
+ static void freeall ();
+
void setCMap (int *colors, int num_colors);
inline void scaleRow (int row, const core::byte *data);
inline void scaleRowSimple (int row, const core::byte *data);