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
This commit is contained in:
parent
5bb4e853c7
commit
e5d53b026c
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user