diff options
author | Sebastian Geerken <devnull@localhost> | 2013-06-17 12:56:47 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2013-06-17 12:56:47 +0200 |
commit | 8ab35cfed90977fabbc7bb5ed8036f07cbaff313 (patch) | |
tree | 2d432dbc4a7ba2a79b3c20388148dfe0eea6d28e | |
parent | 13837a13a756a929d51166c1e4b822a59537ab76 (diff) |
Cleanup.
-rw-r--r-- | dw/core.hh | 3 | ||||
-rw-r--r-- | dw/fltkcore.hh | 11 | ||||
-rw-r--r-- | dw/fltkimgbuf.cc | 7 | ||||
-rw-r--r-- | dw/fltkimgbuf.hh | 2 | ||||
-rw-r--r-- | src/dillo.cc | 2 |
5 files changed, 25 insertions, 0 deletions
@@ -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); diff --git a/src/dillo.cc b/src/dillo.cc index bf25d315..5c1e7364 100644 --- a/src/dillo.cc +++ b/src/dillo.cc @@ -516,6 +516,8 @@ int main(int argc, char **argv) a_Prefs_freeall(); Keys::free(); Paths::free(); + dw::core::freeall(); + dw::fltk::freeall(); /* TODO: auth, css */ //a_Dpi_dillo_exit(); |