Skip to content

Commit

Permalink
Test program "device": add several calls to image destructors to exer…
Browse files Browse the repository at this point in the history
…cise them.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12126 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Manolo Gouy authored and Manolo Gouy committed Nov 30, 2016
1 parent 5bb4e85 commit e5d53b0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/device.cxx
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -751,6 +757,9 @@ int main(int argc, char ** argv) {
w2->show(argc, argv);

Fl::run();
delete pixmap;
delete b_bitmap.image();

return 0;
}

Expand Down

0 comments on commit e5d53b0

Please sign in to comment.