diff options
| author | Manolo Gouy <Manolo> | 2016-11-30 07:12:29 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-11-30 07:12:29 +0000 |
| commit | e5d53b026ced9083513c00a3676c8b22e8d86188 (patch) | |
| tree | ba4029fb0915341d6af99e97c43ec761215ee0f9 /test | |
| parent | 5bb4e853c7c80fa16e568f47c49c2282d197a19c (diff) | |
Test program "device": add several calls to image destructors to exercise them.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12126 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test')
| -rw-r--r-- | test/device.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/device.cxx b/test/device.cxx index 0246de4d1..85d2f89ff 100644 --- a/test/device.cxx +++ b/test/device.cxx @@ -546,6 +546,11 @@ void make_image() { } } +void close_tmp_win(Fl_Widget *win, void *data) { + ((Fl_Shared_Image*)data)->release(); + Fl::delete_widget(win); +} + Fl_Widget *target; const char *operation; @@ -580,6 +585,7 @@ void copy(Fl_Widget *, void *data) { Fl_Box *b = new Fl_Box(FL_NO_BOX,5,5,img->w(), img->h(),0); b->image(img); g2->end(); + g2->callback(close_tmp_win, img); g2->show(); } return; @@ -751,6 +757,9 @@ int main(int argc, char ** argv) { w2->show(argc, argv); Fl::run(); + delete pixmap; + delete b_bitmap.image(); + return 0; } |
