>       I'll yield to ian/matt/mike and the other core folks on this
>       as they seemed to know those details better than I.

If the "ian" in that list means me, then I'd have to disagree - past
evidence suggests strongly that I seldom know what's going on.
Particularly w.r.t. deletion of widgets from the tree!  :-)

What I do know is that, on my systems, once my program has terminated,
there is no residual leakage of memory.

But we know that does not reflect the OP's (slightly unusual) situation.

His app never actually exits, the main window never goes away, and he is
dynamically creating and deleting widgets as he goes along... And he is
seeing some residual "leakage" over time.

I *suspect* (for what little that is worth) that his child windows are
being deleted before they are removed from their parent, or something -
but posting elsewhere suggest that explicitly removing the windows prior
to deletion does not help. 
I wonder if the child windows are (maybe?) not properly parented to his
"main" window, (due perhaps to how he is creating them or something) and
the list items that should normally hold the reference from the parent
to the child are somehow leaking away...?

So... I guess the OP needs to ensure when he creates his child widgets
that the main window is explicitly set current before he creates them
(and are then removed explicitly from the main window prior to
deletion).
Or... Alternately, ensure current is set to NULL before creating the
windows, so they have no parent (is that a good idea, I'm not sure) and
explicitly add'ing them to the main window when they are created...

Or... I dunno...

>       Would be great if deleting widgets was covered in the docs.
>       I think the reason it hasn't is because it has been evolving,
>       and there are several caveats (that should probably be listed)
>       depending on circumstances of when to delete (callbacks 
> vs events)
>       and when delete is handled for you (exiting, 
> window/group destruction)

Yes, really agree. +1.

Cheers,
-- 
Ian






SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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

Reply via email to