![]() |
|
#1
|
|||
|
|||
Memory leak caused by Box::draw()Hi,
I've used valgrind and discovered that the following function may cause memory leak. ImageBox is a user-defined class that heritage from Fl_Box. image_mod is in the type of another image processing library. I copy it to temp_char_array to initialize Fl_RGB_Image. (Actually I can use image_mod to initialize Fl_RGB_Image directly, but still cause memory leak, however) Besides, the image show up on the window is correct, so the initialization of Fl_RGB_Image may not be the problem... The valgrind output point out the problem to be libfontconfig.so, may not help, but the leak summary is listed below: ==11010== LEAK SUMMARY: ==11010== definitely lost: 806 bytes in 6 blocks. ==11010== indirectly lost: 848 bytes in 42 blocks. ==11010== possibly lost: 0 bytes in 0 blocks. ==11010== still reachable: 1,201,143 bytes in 2,859 blocks. ==11010== suppressed: 0 bytes in 0 blocks. ==11010== Reachable blocks (those to which a pointer was found) are not shown. ==11010== To see them, rerun with: --show-reachable=yes No matter the image size, the leak size is always ( 806, 848 ) Any idea? CPP / C++ / C Code:
|
|||
Recent GIDBlog
Problems with the Navy (Officers) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to fix memory leak possibly caused by libfontconfig.so? -- implied by valgrind | jutirain | C++ Forum | 2 | 01-Dec-2007 07:02 |
| Hard drive/CPU Diagnoses Issues | binarybug | Computer Hardware Forum | 1 | 22-Jan-2007 19:23 |
| Memory de-allocation during debugging | gaoanyu | C Programming Language | 12 | 19-Dec-2005 04:50 |
| Pointer Usage in C++: Beginner to Advanced | varunhome | C++ Forum | 0 | 19-Aug-2005 09:25 |
| [Tutorial] Pointers in C (Part I) | Stack Overflow | C Programming Language | 1 | 08-Apr-2005 18:35 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The