>
>       Hmm, your code looks normal to me.
>
>       Seems like there could be a leak alright.. code to check I think
>       would be Fl_Menu_Item::pulldown(..) in Fl_Menu.cxx
>       which is what appears to be doing all the work.

I've tried to run valgrind tool with this small app. Test scenario - popup menu 
10 times. I've got following report:
==402== LEAK SUMMARY:
==402==    definitely lost: 456 bytes in 4 blocks.
==402==    indirectly lost: 777 bytes in 38 blocks.
==402==      possibly lost: 0 bytes in 0 blocks.
==402==    still reachable: 7,463,353 bytes in 3,764 blocks.
==402==         suppressed: 0 bytes in 0 blocks.
==402== Reachable blocks (those to which a pointer was found) are not shown.

"Still reachable" section grows linearly against number of popups.

Then i recompiled it with fltk-1.1.9. Report was:
==23139== LEAK SUMMARY:
==23139==    definitely lost: 432 bytes in 2 blocks.
==23139==    indirectly lost: 728 bytes in 36 blocks.
==23139==      possibly lost: 0 bytes in 0 blocks.
==23139==    still reachable: 145,705 bytes in 2,590 blocks.
==23139==         suppressed: 0 bytes in 0 blocks.

It seems that fltk somehow caches menus or something like that. I'll try to 
figure out how things going in pulldown function. Maybe fltk-1.1.9 sources will 
help.

/*
 * gry
 */
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to