FLTK logo

[fltk.general] Memory leakage after creating a new Fl_Tree

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Memory leakage after creating a new Fl_Tree "'pvr... Jun 11, 2021  
 
My application has a view based on Fl_Tree which displays a report of the database in the app. Everytime I regenerate the report with different parameters (or a different database) it looks like the the Fl_Tree_Item created by Fl_Tree::add() are not deleted by the Fl_Tree::clear().

I was getting humungous memory leakage problems resulting in my app building up to several hundreds of MB quite quickly and I think eventually causing the app to crash. I was getting spurious crashes that I couldn't resolve. I have resolved the two largest issues, so the Fl_Tree issue is the last remaining one. Every time I regenerate the report memory usage increased by about 1 MB, so it's
not too great an issue, just would like to fix it.

Is it a simple matter starting at the root item and working my way through the tree and deleting all the branches?

I am using fltk-1.4.0 using a snapshot taken April 2020.

Thanks Phil.

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/d9d4558d-5764-4106-92ea-9310a1245048n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.