MDI утечка памяти, Помогите разобратся с памятью... |
Здравствуйте, гость ( Вход | Регистрация )
MDI утечка памяти, Помогите разобратся с памятью... |
fortero |
23.5.2011, 1:15
Сообщение
#1
|
Участник Группа: Участник Сообщений: 132 Регистрация: 4.12.2010 Пользователь №: 2242 Спасибо сказали: 0 раз(а) Репутация: 0 |
Доброе время суток, Господа!
Вопрос у меня есть к спецам QT, я сильно начинающий, поправьте если я что-то не так понимаю или скажу. Я пишу программу с использованием дочерних ока MDI. За основу я взял код автора книги, в посте я приведу. Но меня мучают сомнения по поводу утечки памяти! Как вообще правильно отслеживать утечку памяти когда не уверен в коде??? При помощи диспетчера задач? Или есть более правильный метод??? Вот код, взгляните правильно он написан, память высвобождается при закрытии дочерних окон? Там есть опция: setAttribute(Qt::WA_DeleteOnClose); Теоретически должно работать, но у меня есть сомнения. В этом примере дочернее окно используется для создания текстового документа. А в моём случае там ещё банда виджетов! Таблица панели управления. Но если этот код правильный, то вся банда виджетов если унаследовала от родителя то при закрытии дочернего окна они освободят память, верно? Код: main.cpp
mainwin.h
mainwin.cpp
mdichild.h
mdichild.cpp
Очень надеюсь на Вашу помощь, для меня сейчас этот вопрос "вопрос жизни и смерти"! Спасибо за внимание! |
|
|
Litkevich Yuriy |
23.5.2011, 7:43
Сообщение
#2
|
разработчик РЭА Группа: Сомодератор Сообщений: 9669 Регистрация: 9.1.2008 Из: Тюмень Пользователь №: 64 Спасибо сказали: 807 раз(а) Репутация: 94 |
При помощи диспетчера задач? ни в коем случае. Диспетчер задач вообще не позволяет этого делать. Под виндовозом не знаю что посоветовать, скорее всего все инструменты будут платные. Можно этот же код тестировать под линём, под него есть хороший инструмент - valgrind
Или есть более правильный метод??? |
|
|
fortero |
23.5.2011, 9:03
Сообщение
#3
|
Участник Группа: Участник Сообщений: 132 Регистрация: 4.12.2010 Пользователь №: 2242 Спасибо сказали: 0 раз(а) Репутация: 0 |
При помощи диспетчера задач? ни в коем случае. Диспетчер задач вообще не позволяет этого делать. Под виндовозом не знаю что посоветовать, скорее всего все инструменты будут платные. Можно этот же код тестировать под линём, под него есть хороший инструмент - valgrindИли есть более правильный метод??? Спасибо, а под FreeBSD valgrind - будет работать? Всё же под виндузятину хотелось такой инструмент, если кто то знает подскажите пожалуйста. |
|
|
Litkevich Yuriy |
23.5.2011, 9:51
Сообщение
#4
|
разработчик РЭА Группа: Сомодератор Сообщений: 9669 Регистрация: 9.1.2008 Из: Тюмень Пользователь №: 64 Спасибо сказали: 807 раз(а) Репутация: 94 |
|
|
|
fortero |
26.5.2011, 6:20
Сообщение
#5
|
Участник Группа: Участник Сообщений: 132 Регистрация: 4.12.2010 Пользователь №: 2242 Спасибо сказали: 0 раз(а) Репутация: 0 |
а под FreeBSD valgrind - будет работать? вроде работает, хотя я сам не пробовалПоднял Valgrind под FreeBSD, прочёл документацию но многое мне не понятно, вот я сделал лог, таким способом:
Посмотрите пожалуйста, я чтё то не понимаю обясните мне как уже опытный человек, на что стоит обратить внимание, какая утечка и как её вычислить в коде? Раскрывающийся текст ==43065== Memcheck, a memory error detector ==43065== Copyright © 2002-2010, and GNU GPL'd, by Julian Seward et al. ==43065== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==43065== Command: ./qbuh0 ==43065== Parent PID: 19863 ==43065== ==43065== Conditional jump or move depends on uninitialised value(s) ==43065== at 0x1238B16: ??? (in /lib/libz.so.5) ==43065== by 0x1239F7B: ??? (in /lib/libz.so.5) ==43065== by 0x123940D: deflate (in /lib/libz.so.5) ==43065== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==43065== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==43065== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== ==43065== Conditional jump or move depends on uninitialised value(s) ==43065== at 0x1238B28: ??? (in /lib/libz.so.5) ==43065== by 0x1239F7B: ??? (in /lib/libz.so.5) ==43065== by 0x123940D: deflate (in /lib/libz.so.5) ==43065== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==43065== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==43065== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== ==43065== Conditional jump or move depends on uninitialised value(s) ==43065== at 0x1238B37: ??? (in /lib/libz.so.5) ==43065== by 0x1239F7B: ??? (in /lib/libz.so.5) ==43065== by 0x123940D: deflate (in /lib/libz.so.5) ==43065== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==43065== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==43065== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== ==43065== Conditional jump or move depends on uninitialised value(s) ==43065== at 0x1238AC1: ??? (in /lib/libz.so.5) ==43065== by 0x1239F7B: ??? (in /lib/libz.so.5) ==43065== by 0x123940D: deflate (in /lib/libz.so.5) ==43065== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==43065== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==43065== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== ==43065== Conditional jump or move depends on uninitialised value(s) ==43065== at 0x1238AD4: ??? (in /lib/libz.so.5) ==43065== by 0x1239F7B: ??? (in /lib/libz.so.5) ==43065== by 0x123940D: deflate (in /lib/libz.so.5) ==43065== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==43065== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==43065== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== ==43065== Conditional jump or move depends on uninitialised value(s) ==43065== at 0x1238AE6: ??? (in /lib/libz.so.5) ==43065== by 0x1239F7B: ??? (in /lib/libz.so.5) ==43065== by 0x123940D: deflate (in /lib/libz.so.5) ==43065== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==43065== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==43065== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== ==43065== Conditional jump or move depends on uninitialised value(s) ==43065== at 0x1238AF5: ??? (in /lib/libz.so.5) ==43065== by 0x1239F7B: ??? (in /lib/libz.so.5) ==43065== by 0x123940D: deflate (in /lib/libz.so.5) ==43065== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==43065== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==43065== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== ==43065== Conditional jump or move depends on uninitialised value(s) ==43065== at 0x1238B07: ??? (in /lib/libz.so.5) ==43065== by 0x1239F7B: ??? (in /lib/libz.so.5) ==43065== by 0x123940D: deflate (in /lib/libz.so.5) ==43065== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==43065== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==43065== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==43065== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==43065== ==43065== ==43065== HEAP SUMMARY: ==43065== in use at exit: 283,439 bytes in 2,891 blocks ==43065== total heap usage: 241,447 allocs, 238,556 frees, 53,759,866 bytes allocated ==43065== ==43065== LEAK SUMMARY: ==43065== definitely lost: 535 bytes in 10 blocks ==43065== indirectly lost: 1,274 bytes in 19 blocks ==43065== possibly lost: 107,852 bytes in 18 blocks ==43065== still reachable: 173,778 bytes in 2,844 blocks ==43065== suppressed: 0 bytes in 0 blocks ==43065== Rerun with --leak-check=full to see details of leaked memory ==43065== ==43065== For counts of detected and suppressed errors, rerun with: -v ==43065== Use --track-origins=yes to see where uninitialised values come from ==43065== ERROR SUMMARY: 442 errors from 8 contexts (suppressed: 78 from 68) Буду очень признателен! Спасибо за внимание! |
|
|
Litkevich Yuriy |
26.5.2011, 7:53
Сообщение
#6
|
разработчик РЭА Группа: Сомодератор Сообщений: 9669 Регистрация: 9.1.2008 Из: Тюмень Пользователь №: 64 Спасибо сказали: 807 раз(а) Репутация: 94 |
попробуй запускать так:
valgrind --leak-check=full ./qbuh0 |
|
|
fortero |
26.5.2011, 8:32
Сообщение
#7
|
Участник Группа: Участник Сообщений: 132 Регистрация: 4.12.2010 Пользователь №: 2242 Спасибо сказали: 0 раз(а) Репутация: 0 |
попробуй запускать так: valgrind --leak-check=full ./qbuh0 Вот, что выходит: Раскрывающийся текст [8:29:42] fer@fox [bin]>valgrind --leak-check=full ./qbuh0 ==2408== Memcheck, a memory error detector ==2408== Copyright © 2002-2010, and GNU GPL'd, by Julian Seward et al. ==2408== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==2408== Command: ./qbuh0 ==2408== qbuh0(2408)/kdeui (KIconLoader): Unable to find an appropriate lock to guard the shared cache. This *should* be essentially impossible. qbuh0(2408)/kdeui (KIconLoader): Unable to perform initial setup, this system probably does not really support process-shared pthreads or semaphores, even though it claims otherwise. ==2408== Conditional jump or move depends on uninitialised value(s) ==2408== at 0x1238B16: ??? (in /lib/libz.so.5) ==2408== by 0x1239F7B: ??? (in /lib/libz.so.5) ==2408== by 0x123940D: deflate (in /lib/libz.so.5) ==2408== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==2408== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==2408== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== Conditional jump or move depends on uninitialised value(s) ==2408== at 0x1238B28: ??? (in /lib/libz.so.5) ==2408== by 0x1239F7B: ??? (in /lib/libz.so.5) ==2408== by 0x123940D: deflate (in /lib/libz.so.5) ==2408== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==2408== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==2408== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== Conditional jump or move depends on uninitialised value(s) ==2408== at 0x1238B37: ??? (in /lib/libz.so.5) ==2408== by 0x1239F7B: ??? (in /lib/libz.so.5) ==2408== by 0x123940D: deflate (in /lib/libz.so.5) ==2408== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==2408== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==2408== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== Conditional jump or move depends on uninitialised value(s) ==2408== at 0x1238AC1: ??? (in /lib/libz.so.5) ==2408== by 0x1239F7B: ??? (in /lib/libz.so.5) ==2408== by 0x123940D: deflate (in /lib/libz.so.5) ==2408== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==2408== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==2408== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== Conditional jump or move depends on uninitialised value(s) ==2408== at 0x1238AD4: ??? (in /lib/libz.so.5) ==2408== by 0x1239F7B: ??? (in /lib/libz.so.5) ==2408== by 0x123940D: deflate (in /lib/libz.so.5) ==2408== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==2408== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==2408== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== Conditional jump or move depends on uninitialised value(s) ==2408== at 0x1238AE6: ??? (in /lib/libz.so.5) ==2408== by 0x1239F7B: ??? (in /lib/libz.so.5) ==2408== by 0x123940D: deflate (in /lib/libz.so.5) ==2408== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==2408== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==2408== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== Conditional jump or move depends on uninitialised value(s) ==2408== at 0x1238AF5: ??? (in /lib/libz.so.5) ==2408== by 0x1239F7B: ??? (in /lib/libz.so.5) ==2408== by 0x123940D: deflate (in /lib/libz.so.5) ==2408== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==2408== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==2408== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== Conditional jump or move depends on uninitialised value(s) ==2408== at 0x1238B07: ??? (in /lib/libz.so.5) ==2408== by 0x1239F7B: ??? (in /lib/libz.so.5) ==2408== by 0x123940D: deflate (in /lib/libz.so.5) ==2408== by 0x1229014: png_write_finish_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12291AB: png_write_filtered_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12295CE: png_write_find_filter (in /usr/local/lib/libpng.so.6) ==2408== by 0x1224725: png_write_row (in /usr/local/lib/libpng.so.6) ==2408== by 0x12248DD: png_write_rows (in /usr/local/lib/libpng.so.6) ==2408== by 0x3A4FBB: QPNGImageWriter::writeImage(QImage const&, int, QString const&, int, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3A54E6: QPngHandler::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x36F4BE: QImageWriter::write(QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x3579D6: operator<<(QDataStream&, QImage const&) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== ==2408== HEAP SUMMARY: ==2408== in use at exit: 390,385 bytes in 2,909 blocks ==2408== total heap usage: 328,757 allocs, 325,848 frees, 61,531,626 bytes allocated ==2408== ==2408== 4 bytes in 1 blocks are definitely lost in loss record 96 of 693 ==2408== at 0x59AF4: operator new(unsigned int) (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x8055D6B: DbConnect::dbsql() (dbconnect.cpp:104) ==2408== by 0x8057AD5: DbConnect::DbConnect(QWidget*) (dbconnect.cpp:5) ==2408== by 0x8054E24: SecondWin::newWi(int) (secondwin.cpp:27) ==2408== by 0x8052B06: FirstWin::newWSK() (firstwin.cpp:363) ==2408== by 0x80639F0: FirstWin::qt_metacall(QMetaObject::Call, int, void**) (moc_firstwin.cpp:86) ==2408== by 0xDAAFA2: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== by 0xDBB7CE: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== by 0x27B528: QAction::triggered(bool) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x27CC2E: QAction::activate(QAction::ActionEvent) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x73DD9F: QMenuPrivate::activateCausedStack(QList<QPointer<QWidget> > const&, QAction*, QAction::ActionEvent, bool) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x744F1A: QMenuPrivate::activateAction(QAction*, QAction::ActionEvent, bool) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== 7 bytes in 1 blocks are definitely lost in loss record 105 of 693 ==2408== at 0x59278: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x13641CE: _XlcAddCT (in /usr/local/lib/libX11.so.6) ==2408== by 0x136886E: read_charset_define (in /usr/local/lib/libX11.so.6) ==2408== by 0x1369C2A: initialize (in /usr/local/lib/libX11.so.6) ==2408== by 0x136A9F7: _XlcCreateLC (in /usr/local/lib/libX11.so.6) ==2408== by 0x1389E5A: _XlcDefaultLoader (in /usr/local/lib/libX11.so.6) ==2408== by 0x13724EE: _XOpenLC (in /usr/local/lib/libX11.so.6) ==2408== by 0x13725DD: _XrmInitParseInfo (in /usr/local/lib/libX11.so.6) ==2408== by 0x13599C0: NewDatabase (in /usr/local/lib/libX11.so.6) ==2408== by 0x135B467: XrmGetStringDatabase (in /usr/local/lib/libX11.so.6) ==2408== by 0x1339A02: XGetDefault (in /usr/local/lib/libX11.so.6) ==2408== by 0x307FF6: getXDefault(char const*, char const*, int*) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== 8 bytes in 1 blocks are definitely lost in loss record 120 of 693 ==2408== at 0x59278: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x1368775: read_charset_define (in /usr/local/lib/libX11.so.6) ==2408== by 0x1369C2A: initialize (in /usr/local/lib/libX11.so.6) ==2408== by 0x136A9F7: _XlcCreateLC (in /usr/local/lib/libX11.so.6) ==2408== by 0x138DAE9: _XlcUtf8Loader (in /usr/local/lib/libX11.so.6) ==2408== by 0x13724EE: _XOpenLC (in /usr/local/lib/libX11.so.6) ==2408== by 0x13725DD: _XrmInitParseInfo (in /usr/local/lib/libX11.so.6) ==2408== by 0x13599C0: NewDatabase (in /usr/local/lib/libX11.so.6) ==2408== by 0x135B467: XrmGetStringDatabase (in /usr/local/lib/libX11.so.6) ==2408== by 0x1339A02: XGetDefault (in /usr/local/lib/libX11.so.6) ==2408== by 0x307FF6: getXDefault(char const*, char const*, int*) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x31ABC5: qt_init(QApplicationPrivate*, int, _XDisplay*, unsigned long, unsigned long) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== 56 bytes in 1 blocks are definitely lost in loss record 393 of 693 ==2408== at 0x5839A: calloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x1013CA2: ??? (in /lib/libthr.so.3) ==2408== by 0x1597C0C: _xcb_out_init (in /usr/local/lib/libxcb.so.2) ==2408== by 0x15977A4: xcb_connect_to_fd (in /usr/local/lib/libxcb.so.2) ==2408== by 0x159A8D9: xcb_connect_to_display_with_auth_info (in /usr/local/lib/libxcb.so.2) ==2408== by 0x159A9AB: xcb_connect (in /usr/local/lib/libxcb.so.2) ==2408== by 0x135C3B9: _XConnectXCB (in /usr/local/lib/libX11.so.6) ==2408== by 0x1344C25: XOpenDisplay (in /usr/local/lib/libX11.so.6) ==2408== by 0x31B0A7: qt_init(QApplicationPrivate*, int, _XDisplay*, unsigned long, unsigned long) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x28CCD4: QApplicationPrivate::construct(_XDisplay*, unsigned long, unsigned long) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x28DC02: QApplication::QApplication(int&, char**, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x804EB1E: main (main.cpp:13) ==2408== ==2408== 56 bytes in 1 blocks are definitely lost in loss record 394 of 693 ==2408== at 0x5839A: calloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x1013CA2: ??? (in /lib/libthr.so.3) ==2408== by 0x135C36A: _XConnectXCB (in /usr/local/lib/libX11.so.6) ==2408== by 0x1344C25: XOpenDisplay (in /usr/local/lib/libX11.so.6) ==2408== by 0x31B0A7: qt_init(QApplicationPrivate*, int, _XDisplay*, unsigned long, unsigned long) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x28CCD4: QApplicationPrivate::construct(_XDisplay*, unsigned long, unsigned long) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x28DC02: QApplication::QApplication(int&, char**, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x804EB1E: main (main.cpp:13) ==2408== ==2408== 56 bytes in 1 blocks are definitely lost in loss record 395 of 693 ==2408== at 0x5839A: calloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x1013CA2: ??? (in /lib/libthr.so.3) ==2408== by 0x135C383: _XConnectXCB (in /usr/local/lib/libX11.so.6) ==2408== by 0x1344C25: XOpenDisplay (in /usr/local/lib/libX11.so.6) ==2408== by 0x31B0A7: qt_init(QApplicationPrivate*, int, _XDisplay*, unsigned long, unsigned long) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x28CCD4: QApplicationPrivate::construct(_XDisplay*, unsigned long, unsigned long) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x28DC02: QApplication::QApplication(int&, char**, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x804EB1E: main (main.cpp:13) ==2408== ==2408== 120 bytes in 1 blocks are possibly lost in loss record 566 of 693 ==2408== at 0x58212: memalign (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x582BF: posix_memalign (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x119A4D4: ??? (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x119B6A4: g_slice_alloc (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x119C37D: g_slist_prepend (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x119F6C8: g_strsplit (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x11B25F6: g_get_language_names (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x11B29E6: ??? (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x11A6E39: g_thread_init_glib (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x1137607: g_thread_init (in /usr/local/lib/libgthread-2.0.so.0) ==2408== by 0xDD5CB0: QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(_GMainContext*) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== by 0x343CBC: QGuiEventDispatcherGlibPrivate::QGuiEventDispatcherGlibPrivate() (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== 124 bytes in 1 blocks are definitely lost in loss record 567 of 693 ==2408== at 0x59278: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x159AAA4: get_peer_sock_name (in /usr/local/lib/libxcb.so.2) ==2408== by 0x159ABA4: _xcb_get_auth_info (in /usr/local/lib/libxcb.so.2) ==2408== by 0x159A8C9: xcb_connect_to_display_with_auth_info (in /usr/local/lib/libxcb.so.2) ==2408== by 0x159A9AB: xcb_connect (in /usr/local/lib/libxcb.so.2) ==2408== by 0x135C3B9: _XConnectXCB (in /usr/local/lib/libX11.so.6) ==2408== by 0x1344C25: XOpenDisplay (in /usr/local/lib/libX11.so.6) ==2408== by 0x31B0A7: qt_init(QApplicationPrivate*, int, _XDisplay*, unsigned long, unsigned long) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x28CCD4: QApplicationPrivate::construct(_XDisplay*, unsigned long, unsigned long) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x28DC02: QApplication::QApplication(int&, char**, int) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x804EB1E: main (main.cpp:13) ==2408== ==2408== 216 bytes in 1 blocks are definitely lost in loss record 597 of 693 ==2408== at 0x59278: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x137E225: _XimOpenIM (in /usr/local/lib/libX11.so.6) ==2408== by 0x137E05F: _XimRegisterIMInstantiateCallback (in /usr/local/lib/libX11.so.6) ==2408== by 0x1362AD7: XRegisterIMInstantiateCallback (in /usr/local/lib/libX11.so.6) ==2408== by 0x8FD571: QXIMInputContext::QXIMInputContext() (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x8FA9A0: QInputContextFactory::create(QString const&, QObject*) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x286FFC: QApplication::inputContext() const (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x2D5CB1: QWidgetPrivate::inputContext() const (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x2DA6DA: QWidget::inputContext() (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x285A34: QApplicationPrivate::setFocusWidget(QWidget*, Qt::FocusReason) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x2DEA85: QWidget::setFocus(Qt::FocusReason) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x72D796: QMdiSubWindowPrivate::setFocusWidget() (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== 360 bytes in 3 blocks are possibly lost in loss record 616 of 693 ==2408== at 0x58212: memalign (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x582BF: posix_memalign (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x119A4D4: ??? (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x119B6C8: g_slice_alloc (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x119C37D: g_slist_prepend (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x119F6C8: g_strsplit (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x11B25F6: g_get_language_names (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x11B29E6: ??? (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x11A6E39: g_thread_init_glib (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x1137607: g_thread_init (in /usr/local/lib/libgthread-2.0.so.0) ==2408== by 0xDD5CB0: QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(_GMainContext*) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== by 0x343CBC: QGuiEventDispatcherGlibPrivate::QGuiEventDispatcherGlibPrivate() (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== 704 (4 direct, 700 indirect) bytes in 1 blocks are definitely lost in loss record 655 of 693 ==2408== at 0x59AF4: operator new(unsigned int) (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x805BC12: TableCl::refresh_slot() (tablecl.cpp:148) ==2408== by 0x80644FE: TableCl::qt_metacall(QMetaObject::Call, int, void**) (moc_tablecl.cpp:83) ==2408== by 0xDAAFA2: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== by 0xDBB7CE: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== by 0x27B528: QAction::triggered(bool) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x27CC2E: QAction::activate(QAction::ActionEvent) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x78D5D1: QToolButton::nextCheckState() (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x6A42AE: QAbstractButtonPrivate::click() (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x6A455B: QAbstractButton::mouseReleaseEvent(QMouseEvent*) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x78D6CB: QToolButton::mouseReleaseEvent(QMouseEvent*) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x2E5F78: QWidget::event(QEvent*) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== 704 (4 direct, 700 indirect) bytes in 1 blocks are definitely lost in loss record 656 of 693 ==2408== at 0x59AF4: operator new(unsigned int) (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x8054F88: SecondWin::newWi(int) (secondwin.cpp:31) ==2408== by 0x8052B06: FirstWin::newWSK() (firstwin.cpp:363) ==2408== by 0x80639F0: FirstWin::qt_metacall(QMetaObject::Call, int, void**) (moc_firstwin.cpp:86) ==2408== by 0xDAAFA2: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== by 0xDBB7CE: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== by 0x27B528: QAction::triggered(bool) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x27CC2E: QAction::activate(QAction::ActionEvent) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x73DD9F: QMenuPrivate::activateCausedStack(QList<QPointer<QWidget> > const&, QAction*, QAction::ActionEvent, bool) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x744F1A: QMenuPrivate::activateAction(QAction*, QAction::ActionEvent, bool) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x747001: QMenu::mouseReleaseEvent(QMouseEvent*) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x2E5F78: QWidget::event(QEvent*) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== 1,240 bytes in 5 blocks are possibly lost in loss record 666 of 693 ==2408== at 0x58212: memalign (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x582BF: posix_memalign (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x119A4D4: ??? (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x119B6C8: g_slice_alloc (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x115196E: g_array_sized_new (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x1151AB2: g_array_new (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x11A6652: g_static_private_set (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x1161920: g_get_filename_charsets (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x116199C: ??? (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x11A6E29: g_thread_init_glib (in /usr/local/lib/libglib-2.0.so.0) ==2408== by 0x1137607: g_thread_init (in /usr/local/lib/libgthread-2.0.so.0) ==2408== by 0xDD5CB0: QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(_GMainContext*) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== ==2408== 8,742 (4 direct, 8,738 indirect) bytes in 1 blocks are definitely lost in loss record 687 of 693 ==2408== at 0x59AF4: operator new(unsigned int) (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x8056051: DbConnect::selectSK(QString const&, QString const&, QString const&) (dbconnect.cpp:84) ==2408== by 0x805BB5B: TableCl::refresh_slot() (tablecl.cpp:145) ==2408== by 0x80644FE: TableCl::qt_metacall(QMetaObject::Call, int, void**) (moc_tablecl.cpp:83) ==2408== by 0xDAAFA2: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== by 0xDBB7CE: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== by 0x27B528: QAction::triggered(bool) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x27CC2E: QAction::activate(QAction::ActionEvent) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x78D5D1: QToolButton::nextCheckState() (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x6A42AE: QAbstractButtonPrivate::click() (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x6A455B: QAbstractButton::mouseReleaseEvent(QMouseEvent*) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x78D6CB: QToolButton::mouseReleaseEvent(QMouseEvent*) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== 8,742 (4 direct, 8,738 indirect) bytes in 1 blocks are definitely lost in loss record 688 of 693 ==2408== at 0x59AF4: operator new(unsigned int) (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x8056051: DbConnect::selectSK(QString const&, QString const&, QString const&) (dbconnect.cpp:84) ==2408== by 0x8054EC5: SecondWin::newWi(int) (secondwin.cpp:28) ==2408== by 0x8052B06: FirstWin::newWSK() (firstwin.cpp:363) ==2408== by 0x80639F0: FirstWin::qt_metacall(QMetaObject::Call, int, void**) (moc_firstwin.cpp:86) ==2408== by 0xDAAFA2: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== by 0xDBB7CE: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== by 0x27B528: QAction::triggered(bool) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x27CC2E: QAction::activate(QAction::ActionEvent) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x73DD9F: QMenuPrivate::activateCausedStack(QList<QPointer<QWidget> > const&, QAction*, QAction::ActionEvent, bool) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x744F1A: QMenuPrivate::activateAction(QAction*, QAction::ActionEvent, bool) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== by 0x747001: QMenu::mouseReleaseEvent(QMouseEvent*) (in /usr/local/lib/qt4/libQtGui.so.4.7.3) ==2408== ==2408== 24,492 bytes in 2 blocks are possibly lost in loss record 689 of 693 ==2408== at 0x59278: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x642656C: my_malloc (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x6424796: alloc_root (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x640B58E: cli_read_rows (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x6409E47: mysql_store_result (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x39FB1E1: QMYSQLResult::reset(QString const&) (in /usr/local/lib/qt4/plugins/sqldrivers/libqsqlmysql.so) ==2408== by 0x6F9A8: QSqlQuery::exec(QString const&) (in /usr/local/lib/qt4/libQtSql.so.4.7.3) ==2408== by 0x80561BB: DbConnect::selectSK(QString const&, QString const&, QString const&) (dbconnect.cpp:86) ==2408== by 0x805BB5B: TableCl::refresh_slot() (tablecl.cpp:145) ==2408== by 0x80644FE: TableCl::qt_metacall(QMetaObject::Call, int, void**) (moc_tablecl.cpp:83) ==2408== by 0xDAAFA2: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== by 0xDBB7CE: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== ==2408== 24,492 bytes in 2 blocks are possibly lost in loss record 690 of 693 ==2408== at 0x59278: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x642656C: my_malloc (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x6424796: alloc_root (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x640B58E: cli_read_rows (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x6409E47: mysql_store_result (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x39FB1E1: QMYSQLResult::reset(QString const&) (in /usr/local/lib/qt4/plugins/sqldrivers/libqsqlmysql.so) ==2408== by 0x6F9A8: QSqlQuery::exec(QString const&) (in /usr/local/lib/qt4/libQtSql.so.4.7.3) ==2408== by 0x80561BB: DbConnect::selectSK(QString const&, QString const&, QString const&) (dbconnect.cpp:86) ==2408== by 0x8054EC5: SecondWin::newWi(int) (secondwin.cpp:28) ==2408== by 0x8052B06: FirstWin::newWSK() (firstwin.cpp:363) ==2408== by 0x80639F0: FirstWin::qt_metacall(QMetaObject::Call, int, void**) (moc_firstwin.cpp:86) ==2408== by 0xDAAFA2: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== ==2408== 73,476 bytes in 6 blocks are possibly lost in loss record 692 of 693 ==2408== at 0x59278: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x642656C: my_malloc (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x6424796: alloc_root (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x640B5AE: cli_read_rows (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x6409E47: mysql_store_result (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x39FB1E1: QMYSQLResult::reset(QString const&) (in /usr/local/lib/qt4/plugins/sqldrivers/libqsqlmysql.so) ==2408== by 0x6F9A8: QSqlQuery::exec(QString const&) (in /usr/local/lib/qt4/libQtSql.so.4.7.3) ==2408== by 0x80561BB: DbConnect::selectSK(QString const&, QString const&, QString const&) (dbconnect.cpp:86) ==2408== by 0x805BB5B: TableCl::refresh_slot() (tablecl.cpp:145) ==2408== by 0x80644FE: TableCl::qt_metacall(QMetaObject::Call, int, void**) (moc_tablecl.cpp:83) ==2408== by 0xDAAFA2: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== by 0xDBB7CE: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== ==2408== 73,476 bytes in 6 blocks are possibly lost in loss record 693 of 693 ==2408== at 0x59278: malloc (in /usr/local/lib/valgrind/vgpreload_memcheck-x86-freebsd.so) ==2408== by 0x642656C: my_malloc (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x6424796: alloc_root (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x640B5AE: cli_read_rows (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x6409E47: mysql_store_result (in /usr/local/lib/mysql/libmysqlclient.so.18) ==2408== by 0x39FB1E1: QMYSQLResult::reset(QString const&) (in /usr/local/lib/qt4/plugins/sqldrivers/libqsqlmysql.so) ==2408== by 0x6F9A8: QSqlQuery::exec(QString const&) (in /usr/local/lib/qt4/libQtSql.so.4.7.3) ==2408== by 0x80561BB: DbConnect::selectSK(QString const&, QString const&, QString const&) (dbconnect.cpp:86) ==2408== by 0x8054EC5: SecondWin::newWi(int) (secondwin.cpp:28) ==2408== by 0x8052B06: FirstWin::newWSK() (firstwin.cpp:363) ==2408== by 0x80639F0: FirstWin::qt_metacall(QMetaObject::Call, int, void**) (moc_firstwin.cpp:86) ==2408== by 0xDAAFA2: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (in /usr/local/lib/qt4/libQtCore.so.4.7.3) ==2408== ==2408== LEAK SUMMARY: ==2408== definitely lost: 543 bytes in 12 blocks ==2408== indirectly lost: 18,876 bytes in 40 blocks ==2408== possibly lost: 197,656 bytes in 25 blocks ==2408== still reachable: 173,310 bytes in 2,832 blocks ==2408== suppressed: 0 bytes in 0 blocks ==2408== Reachable blocks (those to which a pointer was found) are not shown. ==2408== To see them, rerun with: --leak-check=full --show-reachable=yes ==2408== ==2408== For counts of detected and suppressed errors, rerun with: -v ==2408== Use --track-origins=yes to see where uninitialised values come from ==2408== ERROR SUMMARY: 317 errors from 27 contexts (suppressed: 79 from 69) Вы поясните как читать этот лог, правельно. Что бы я сам мог орентироваться. Спасибо за внимание! |
|
|
Litkevich Yuriy |
26.5.2011, 8:54
Сообщение
#8
|
разработчик РЭА Группа: Сомодератор Сообщений: 9669 Регистрация: 9.1.2008 Из: Тюмень Пользователь №: 64 Спасибо сказали: 807 раз(а) Репутация: 94 |
Вы поясните как читать этот лог, правельно. ХМ. там по-моему ничего загадочного нет.указана цепочка вызовов явно воздействующая на память (выделене/освобождение). Адрес | название метода | имя файла:строка исходника то вся банда виджетов если унаследовала от родителя то при закрытии дочернего окна они освободят память, верно? они-то освободят, но вот Qt не обязана вернуть её системе (а вдруг ещё пригодится?)За утечку считай - постоянный прирост потребления памяти при многократном создании/закрытие субокна |
|
|
fortero |
26.5.2011, 9:46
Сообщение
#9
|
Участник Группа: Участник Сообщений: 132 Регистрация: 4.12.2010 Пользователь №: 2242 Спасибо сказали: 0 раз(а) Репутация: 0 |
Вы поясните как читать этот лог, правельно. ХМ. там по-моему ничего загадочного нет.указана цепочка вызовов явно воздействующая на память (выделене/освобождение). Адрес | название метода | имя файла:строка исходника то вся банда виджетов если унаследовала от родителя то при закрытии дочернего окна они освободят память, верно? они-то освободят, но вот Qt не обязана вернуть её системе (а вдруг ещё пригодится?)За утечку считай - постоянный прирост потребления памяти при многократном создании/закрытие субокна Но а Вы можете сказать о размере течи судя по моему логу? Я когда открываю сую окна память в top добовляется... У меня все обекты которые созданы по принципу указателя имеют наследии, но а понту наследия если, родитель то по факту не суб окно а массив суб окон, ведь так? Какой вердикт, так и должно быть, или можно принять какие то меры??? Спасибо аз внимание! |
|
|
Текстовая версия | Сейчас: 22.12.2024, 10:26 |