STR #967

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]

Return to Bugs & Features | Roadmap 1.1 ]

STR #967

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:2 - Low, e.g. a documentation error or undocumented side-effect
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:memory leak - no destructor in the class Fl_Check_browser
Created By:miguel2i
Assigned To:dejan
Fix Version:1.1-current (SVN: v4461)
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

No files

Trouble Report Comments:

Name/Time/Date Text top right image
#1 miguel2i
10:05 Aug 04, 2005
Run this test program with valgrind :
-------------------- test program
#include <FL/Fl.H>
#include <FL/Fl_Check_Browser.H>
#include <FL/Fl_Double_Window.H>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>

int main(int argc, char **argv) {
        Fl_Window window(400,400,"Check_Browser Test");
        Fl_Check_Browser browser(0,0,400,350,0);
        return Fl::run();
-------------------- end of test program

patch for FL/Fl_Check_Browser.H
-------------------- patch
@@ -67,6 +67,7 @@

   Fl_Check_Browser(int x, int y, int w, int h, const char *l = 0);
+  ~Fl_Check_Browser() { clear(); }

   int add(char *s);               // add an (unchecked) item
   int add(char *s, int b);        // add an item and set checked
-------------------- end of patch
#2 dejan
06:33 Aug 05, 2005
Fixed in Subversion repository.  
bottom left image   bottom right image

Return to Bugs & Features ]


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