DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Link: http://www.fltk.org/str.php?L2840
Version: 1.3-feature
Destructor Fl_Widget_Type doesn't release captured images from common list
Fluid_Image::images. I don't know whether it is an intentional behavior or
not, but one of consequences of it is Fluid can't reload changed image
files (by means of the "revert" menu item).
Proposed changes are quite apparent.
Link: http://www.fltk.org/str.php?L2840
Version: 1.3-feature
--- fltk/fluid/Fl_Widget_Type.cxx
+++ fltk/fluid/Fl_Widget_Type.cxx
@@ -215,8 +215,8 @@
}
if (subclass_) free((void*)subclass_);
if (tooltip_) free((void*)tooltip_);
- if (image_name_) free((void*)image_name_);
- if (inactive_name_) free((void*)inactive_name_);
+ if (image_name_) {if (image) image->decrement(); free((void*)image_name_);}
+ if (inactive_name_){if (inactive) inactive->decrement();
free((void*)inactive_name_);}
for (int n=0; n<NUM_EXTRA_CODE; n++) {
if (extra_code_[n]) free((void*) extra_code_[n]);
}
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev