Closed GoogleCodeExporter closed 9 years ago
add a fix: r408
Original comment by libfet...@gmail.com
on 6 Nov 2009 at 11:14
GUI memleak:
我贴出那个泄露最多的几个类型,具体其它的请见附件:
主要是由以下几个函数导致的,并且是循环很多次的出现.(也��
�一定,QT里面有自己的内存分配管理)
==16161== 40 bytes in 1 blocks are possibly lost in loss record 3,522 of 6,888
==16161== at 0x4021BDE: calloc (vg_replace_malloc.c:397)
==16161== by 0x55B3C74: g_malloc0 (in /usr/lib/libglib-2.0.so.0.1600.6)
==16161== by 0x97062F4: (within /usr/lib/libgobject-2.0.so.0.1600.6)
==16161== by 0x9706494: (within /usr/lib/libgobject-2.0.so.0.1600.6)
==16161== by 0x970A1FC: g_type_register_fundamental (in
/usr/lib/libgobject-2.0.so.0.1600.6)
==16161== by 0x96F160B: (within /usr/lib/libgobject-2.0.so.0.1600.6)
==16161== by 0x970925B: g_type_init_with_debug_flags (in
/usr/lib/libgobject-2.0.so.0.1600.6)
==16161== by 0x9709331: g_type_init (in /usr/lib/libgobject-2.0.so.0.1600.6)
==16161== by 0x47B9AF7: (within /usr/lib/libQtGui.so.4.4.0)
==16161== by 0x47B9DEA:
QCleanlooksStyle::standardPixmap(QStyle::StandardPixmap,
QStyleOption const*, QWidget const*) const (in /usr/lib/libQtGui.so.4.4.0)
==16161== by 0x47B724C:
QCleanlooksStyle::standardIconImplementation(QStyle::StandardPixmap,
QStyleOption
const*, QWidget const*) const (in /usr/lib/libQtGui.so.4.4.0)
==16161== by 0x4A944B7: QCleanlooksStyle::qt_metacall(QMetaObject::Call, int,
void**) (in /usr/lib/libQtGui.so.4.4.0)
==16161==
==16161==
==16161== 207,284 (68 direct, 207,216 indirect) bytes in 1 blocks are
definitely lost
in loss record 4,213 of 6,888
==16161== at 0x4022F14: operator new[](unsigned) (vg_replace_malloc.c:268)
==16161== by 0x4D1CE58: QHashData::rehash(int) (in
/usr/lib/libQtCore.so.4.4.0)
==16161== by 0x434B1AA: (within /usr/lib/libQtXml.so.4.4.0)
==16161== by 0x4350FD1: (within /usr/lib/libQtXml.so.4.4.0)
==16161== by 0x436586A: (within /usr/lib/libQtXml.so.4.4.0)
==16161== by 0x4364B92: (within /usr/lib/libQtXml.so.4.4.0)
==16161== by 0x43656B2: (within /usr/lib/libQtXml.so.4.4.0)
==16161== by 0x4364B92: (within /usr/lib/libQtXml.so.4.4.0)
==16161== by 0x43656B2: (within /usr/lib/libQtXml.so.4.4.0)
==16161== by 0x4369BE6: (within /usr/lib/libQtXml.so.4.4.0)
==16161== by 0x436A139: QXmlSimpleReader::parse(QXmlInputSource const*,
bool) (in
/usr/lib/libQtXml.so.4.4.0)
==16161== by 0x4355D4F: QXmlSimpleReader::parse(QXmlInputSource const*) (in
/usr/lib/libQtXml.so.4.4.0)
==16161==
==16161== 960 (816 direct, 144 indirect) bytes in 12 blocks are definitely lost
in
loss record 4,280 of 6,888
==16161== at 0x4023294: operator new(unsigned) (vg_replace_malloc.c:224)
==16161== by 0x4DF91D0: QObject::QObject(QObject*) (in
/usr/lib/libQtCore.so.4.4.0)
==16161== by 0x8122C17: FxLocationParser::FxLocationParser()
(fxlocationparser.cpp:28)
==16161== by 0x807361B: BuddyOpt::createAccountTipsInfo(_fetion_account
const*)
(fxbuddy.cpp:763)
==16161== by 0x8073B71: BuddyOpt::setTipsOfAccount(QTreeWidgetItem*,
_fetion_account const*) (fxbuddy.cpp:789)
==16161== by 0x8073E38: BuddyOpt::addAccountToGroup(_fetion_account const*,
QString&, int, int) (fxbuddy.cpp:626)
==16161== by 0x80740A7: BuddyOpt::addAccountToGroup(_fetion_account const*)
(fxbuddy.cpp:559)
==16161== by 0x8074579: BuddyOpt::addAccountToTree() (fxbuddy.cpp:534)
==16161== by 0x8075141: BuddyOpt::BuddyOpt(QTreeWidget*, bool)
(fxbuddy.cpp:38)
==16161== by 0x80AFD6D: FxScheduleSMS::FxScheduleSMS(FxMainWindow*, QWidget*)
(fxscheduleSms.cpp:43)
==16161== by 0x806C51A: FxMainWindow::FxMainWindow(QWidget*)
(fxmainwindow.cpp:57)
==16161== by 0x805B754: FxMain::createMainWindow() (fxmain.cpp:61)
Original comment by libfet...@gmail.com
on 6 Nov 2009 at 11:37
Attachments:
libfx memleak:
这个我可以控制的(也是由于时间关系,故意没去做)
因为它的泄露是非常少的(还可以重用),但我也会尽量减少的.
同样将其泄露函数贴上来
Original comment by libfet...@gmail.com
on 6 Nov 2009 at 11:39
Attachments:
fix the FxLocationParser memleak in r409.
==17876== 79,160 (460 direct, 78,700 indirect) bytes in 23 blocks are
definitely lost
in loss record 1,596 of 12,859
==17876== at 0x4022AB8: malloc (vg_replace_malloc.c:207)
==17876== by 0x518DBDC: qMalloc(unsigned) (qmalloc.cpp:55)
==17876== by 0x51B727F: QHashData::allocateNode() (qhash.cpp:174)
==17876== by 0x41AD991:
QPatternist::ConstructorFunctionsFactory::ConstructorFunctionsFactory(QExplicitl
ySharedDataPointer<QPatternist::NamePool>
const&, QExplicitlySharedDataPointer<QPatternist::SchemaTypeFactory> const&)
(qhash.h:519)
==17876== by 0x41BB784:
QPatternist::FunctionFactoryCollection::xpath20Factory(QExplicitlySharedDataPoin
ter<QPatternist::NamePool>
const&) (qfunctionfactorycollection.cpp:127)
==17876== by 0x41076D4: QXmlQueryPrivate::staticContext() (qxmlquery_p.h:146)
==17876== by 0x4107A79: QXmlQueryPrivate::expression(QIODevice*)
(qxmlquery_p.h:267)
==17876== by 0x411D035: QXmlQuery::setQuery(QIODevice*, QUrl const&)
(qxmlquery.cpp:419)
==17876== by 0x411D691: QXmlQuery::setQuery(QString const&, QUrl const&)
(qxmlquery.cpp:438)
==17876== by 0x8124C27: FxLocationParser::getValueByTagName(QString, QString)
(fxlocationparser.cpp:128)
==17876== by 0x8124F98: FxLocationParser::getCityByCode(int)
(fxlocationparser.cpp:73)
==17876== by 0x8074F2C: BuddyOpt::createAccountTipsInfo(_fetion_account
const*)
(fxbuddy.cpp:772)
Original comment by libfet...@gmail.com
on 6 Nov 2009 at 12:19
After apply the r409 's patch, the app memory from 30M down to 10M.
aha. :)
Original comment by libfet...@gmail.com
on 6 Nov 2009 at 12:35
add a new mem check about libfetion library.
Original comment by libfet...@gmail.com
on 6 Nov 2009 at 12:41
Attachments:
add a small fix for delete object. r410
Original comment by libfet...@gmail.com
on 6 Nov 2009 at 2:18
add the libfetion mem leak fix of linux 64 bit platform r416.
Original comment by libfet...@gmail.com
on 10 Nov 2009 at 5:02
Currently, the memory of libfetion librayr down to 40k from 90k.
Original comment by libfet...@gmail.com
on 10 Nov 2009 at 5:03
have fixed it.
Original comment by libfet...@gmail.com
on 11 Nov 2009 at 2:57
Original issue reported on code.google.com by
libfet...@gmail.com
on 6 Nov 2009 at 11:10