mkajdas.mkprod wrote:
> After all of my previously discussed fixes were implemented, I still had
> small memory leaks in some windows.
> I finally figured out the problem and I would like to share it with others.
>
> The problem was with usage of Fl_Image::copy() which I used to copy and
> modify images used in buttons.
> Every time this function is called it allocates memory for the new image and
> the pointer returned must be deleted in order to release this memory.
>
> I was not doing this and every time I created a window more memory was
> allocated and when I deleted a window the allocated memory was lost.
>
> After making sure that every call to copy() had a corresponding delete, the
> leaks stopped.
> Martin
If you think clarification in the docs would have helped you
avoid all this, definitely post an STR specifying which docs
should change, and if possible, the specific text you'd like
to see added.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk