That is the result of valgrind, a memory debugger, when running the plugandpaint example and doing some things like switching windows, painting something, using menu entries...

I'm testing under Linux.
Qt Code:
  1. valgrind --tool=memcheck --leak-check=full ./plugandpaint
  2. ==16772== Memcheck, a memory error detector for x86-linux.
  3. ==16772== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
  4. ==16772== Using valgrind-2.4.0, a program supervision framework for x86-linux.
  5. ==16772== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
  6. ==16772== For more details, rerun with: -v
  7. ==16772==
  8. ==16772== Conditional jump or move depends on uninitialised value(s)
  9. ==16772== at 0x1C229F47: store_to_database (in /usr/lib/libX11.so.6.2)
  10. ==16772==
  11. ==16772== Conditional jump or move depends on uninitialised value(s)
  12. ==16772== at 0x1C229F50: store_to_database (in /usr/lib/libX11.so.6.2)
  13. ==16772==
  14. ==16772== Conditional jump or move depends on uninitialised value(s)
  15. ==16772== at 0x1C229F9B: store_to_database (in /usr/lib/libX11.so.6.2)
  16. ==16772==
  17. ==16772== Conditional jump or move depends on uninitialised value(s)
  18. ==16772== at 0x1C229FA0: store_to_database (in /usr/lib/libX11.so.6.2)
  19. ==16772==
  20. ==16772== Syscall param write(buf) points to uninitialised byte(s)
  21. ==16772== at 0x1C470248: write (in /lib/libpthread-0.10.so)
  22. ==16772== Address 0x1C77F510 is 320 bytes inside a block of size 16384 alloc'd
  23. ==16772== at 0x1B904E9A: calloc (vg_replace_malloc.c:176)
  24. ==16772== by 0x1C1D0E09: XOpenDisplay (in /usr/lib/libX11.so.6.2)
  25. ==16772==
  26. ==16772== Syscall param writev(vector[...]) points to uninitialised byte(s)
  27. ==16772== at 0x1C6663AE: (within /lib/libc-2.3.6.so)
  28. ==16772== by 0x1C2036BD: _X11TransSocketWritev (in /usr/lib/libX11.so.6.2)
  29. ==16772== Address 0x1C77F45E is 142 bytes inside a block of size 16384 alloc'd
  30. ==16772== at 0x1B904E9A: calloc (vg_replace_malloc.c:176)
  31. ==16772== by 0x1C1D0E09: XOpenDisplay (in /usr/lib/libX11.so.6.2)
  32. ==16772==
  33. ==16772== ERROR SUMMARY: 90 errors from 6 contexts (suppressed: 86 from 2)
  34. ==16772== malloc/free: in use at exit: 974296 bytes in 7456 blocks.
  35. ==16772== malloc/free: 236588 allocs, 229132 frees, 66411306 bytes allocated.
  36. ==16772== For counts of detected errors, rerun with: -v
  37. ==16772== searching for pointers to 7456 not-freed blocks.
  38. ==16772== checked 1740280 bytes.
  39. ==16772==
  40. ==16772==
  41. ==16772== 20 bytes in 1 blocks are definitely lost in loss record 30 of 116
  42. ==16772== at 0x1B904368: malloc (vg_replace_malloc.c:130)
  43. ==16772== by 0x1C61D12F: strdup (in /lib/libc-2.3.6.so)
  44. ==16772== by 0x1BB33812: qt_init(QApplicationPrivate*, int, _XDisplay*, unsigned long, unsigned long) (in /usr/lib/qt4/libQtGui_debug.so.4.1.0)
  45. ==16772== by 0x1BAD0F4E: QApplicationPrivate::construct() (in /usr/lib/qt4/libQtGui_debug.so.4.1.0)
  46. ==16772== by 0x1BAD0B76: QApplication::QApplication(int&, char**) (in /usr/lib/qt4/libQtGui_debug.so.4.1.0)
  47. ==16772== by 0x804EE1C: (within /usr/share/doc/qt-4.1.0/examples/tools/plugandpaint/plugandpaint)
  48. ==16772== by 0x1C5CB554: __libc_start_main (in /lib/libc-2.3.6.so)
  49. ==16772== by 0x804EC50: (within /usr/share/doc/qt-4.1.0/examples/tools/plugandpaint/plugandpaint)
  50. ==16772==
  51. ==16772==
  52. ==16772== 68 bytes in 1 blocks are possibly lost in loss record 45 of 116
  53. ==16772== at 0x1B904E9A: calloc (vg_replace_malloc.c:176)
  54. ==16772== by 0x1B8F2148: allocate_dtv (in /lib/ld-2.3.6.so)
  55. ==16772== by 0x1B8F21FF: _dl_allocate_tls_storage (in /lib/ld-2.3.6.so)
  56. ==16772== by 0x1B8F2427: _dl_allocate_tls (in /lib/ld-2.3.6.so)
  57. ==16772== by 0x1C46B971: __pthread_initialize_minimal (in /lib/libpthread-0.10.so)
  58. ==16772== by 0x1C468314: ??? (crti.S:19)
  59. ==16772== by 0x1C467CEF: ??? (crti.S:32)
  60. ==16772== by 0x1B8EFB4D: call_init (in /lib/ld-2.3.6.so)
  61. ==16772== by 0x1B8EFCDD: _dl_init (in /lib/ld-2.3.6.so)
  62. ==16772== by 0x1B8E480E: (within /lib/ld-2.3.6.so)
  63. ==16772==
  64. ==16772==
  65. ==16772== 156 (36 direct, 120 indirect) bytes in 1 blocks are definitely lost in loss record 56 of 116
  66. ==16772== at 0x1B904368: malloc (vg_replace_malloc.c:130)
  67. ==16772== by 0x1C67CEF8: (within /lib/libc-2.3.6.so)
  68. ==16772== by 0x1C67C7F3: __nss_database_lookup (in /lib/libc-2.3.6.so)
  69. ==16772== by 0x1B9201EB: ???
  70. ==16772== by 0x1B921DA4: ???
  71. ==16772== by 0x1C63C9E3: getpwuid_r (in /lib/libc-2.3.6.so)
  72. ==16772== by 0x1C63C45E: getpwuid (in /lib/libc-2.3.6.so)
  73. ==16772== by 0x1BB3D5AD: (within /usr/lib/qt4/libQtGui_debug.so.4.1.0)
  74. ==16772== by 0x1BB3D2E9: (within /usr/lib/qt4/libQtGui_debug.so.4.1.0)
  75. ==16772== by 0x1C0B2DCA: _SmcProcessMessage (in /usr/lib/libSM.so.6.0)
  76. ==16772==
  77. ==16772==
  78. ==16772== 2720 bytes in 1 blocks are possibly lost in loss record 105 of 116
  79. ==16772== at 0x1B905096: memalign (vg_replace_malloc.c:217)
  80. ==16772== by 0x1B8F21D1: _dl_allocate_tls_storage (in /lib/ld-2.3.6.so)
  81. ==16772== by 0x1B8F2427: _dl_allocate_tls (in /lib/ld-2.3.6.so)
  82. ==16772== by 0x1C46B971: __pthread_initialize_minimal (in /lib/libpthread-0.10.so)
  83. ==16772== by 0x1C468314: ??? (crti.S:19)
  84. ==16772== by 0x1C467CEF: ??? (crti.S:32)
  85. ==16772== by 0x1B8EFB4D: call_init (in /lib/ld-2.3.6.so)
  86. ==16772== by 0x1B8EFCDD: _dl_init (in /lib/ld-2.3.6.so)
  87. ==16772== by 0x1B8E480E: (within /lib/ld-2.3.6.so)
  88. ==16772==
  89. ==16772== LEAK SUMMARY:
  90. ==16772== definitely lost: 56 bytes in 2 blocks.
  91. ==16772== indirectly lost: 120 bytes in 10 blocks.
  92. ==16772== possibly lost: 2788 bytes in 2 blocks.
  93. ==16772== still reachable: 971332 bytes in 7442 blocks.
  94. ==16772== suppressed: 0 bytes in 0 blocks.
  95. ==16772== Reachable blocks (those to which a pointer was found) are not shown.
  96. ==16772== To see them, rerun with: --show-reachable=yes
To copy to clipboard, switch view to plain text mode 
Looks like everything is ok

The Qt runtime allocates sometimes more memory to create new instances and releases these when they are no longer needed. An example are popup menus.