×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    22

    Memory Leak tools for Qt on Symbian?

    Hi

    Built into the Symbian SDK there are various tools for use on the emulator that can help identify potential memory and resource leak issues.

    There do not appear to be any such tools for the Nokia Qt SDK since the same Emulator (epoc.exe) is not used.

    Does anyone know if there are any tools that we can use the assist with Memory leak tracking for Qt on Symbian development?

    All suggestions welcome!

    Thanks

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Memory Leak tools for Qt on Symbian?


  3. #3
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Memory Leak tools for Qt on Symbian?

    QObject::dumpObjectTree against a suspect object will reveal if it's accumulating "trash". Run it against QApplication while doing repeated scroll windows or WebKit calls and you'll find plenty. (Supposedly fixed in 4.7 beta 2.)

    <scoll area ptr>->viewport()->ungrabGesture(Qt::PanGesture);

    will clean up some of the leaks, when done after one of these: QAbstractScrollArea, QScrollArea, QPlainTextEdit, QTextEdit, QTextBrowser

    In general you can track heap growth on Symbian with something like this:
    Code:
    void HeapLeak::updateHeapStats() {
    	
    #ifdef Q_OS_SYMBIAN
    	TInt mem, size, limit;
    	User::Heap().AllocSize(mem);
    	size = User::Heap().Size();
    	limit = User::Heap().MaxLength();
    #endif
    	ui.countLabel ->setText(QString::number(count));
    	ui.countLabel ->update();
    #ifdef Q_OS_SYMBIAN
    	ui.memLabel ->setText(QString::number(mem));
    	ui.memLabel ->update();
    	ui.sizeLabel ->setText(QString::number(size));
    	ui.sizeLabel ->update();
    	ui.limitLabel ->setText(QString::number(limit));
    	ui.limitLabel ->update();
    #endif
    
    }

  4. #4
    Registered User
    Join Date
    Jun 2009
    Posts
    22

    Re: Memory Leak tools for Qt on Symbian?

    Thanks both for those suggestions. Its a shame the same memory allocation tools are not usable on the Qt simulator but those 2 suggestions will at least give us some options to try. Cheers

Similar Threads

  1. memory leak detecting tools @ runtime
    By SomehowFallen in forum Symbian
    Replies: 6
    Last Post: 2008-03-13, 16:06
  2. Memory Leak Detection Tools
    By psousa in forum Symbian
    Replies: 4
    Last Post: 2005-06-04, 12:49
  3. Memory Leak Detection Tools
    By psousa in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2003-09-24, 09:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×