Hi all,
I noticed a very interesting finding. I was testing my application involving a custom made GUI element which was being updated by data coming from an external source. The update of GUI was done using a slot(Qt specific detail) function whenever data arrived on serial port. Now the data was coming a rate of 10 packets a second i.e the update GUI function was being called 10 packets a second. This had the effect of slowing down the application in addition to constantly increasing its memory footprint. It started at 60 MB and increased to 65 MB in a couple of hours.
My conclusion was that updating the GUI is slow and when a slot for updating is called 10 times a second, the slot calls are queued in the long run thus degrading application response time.
I solved this problem by caching the incoming value and updating the GUI on when there is change in the incoming value.
I have tried various free tools like valgrind-memcheck, leak checker but there results aren't helpful, in fact leak checker doesn't find the leak but my programs memory size is increasing constantly. Does that mean it is because of queuing of signal slot connection as GUI update is inherently slow?
Now here lies the issue. Tracking down memory leaks is hard enough and if Qt is involved how can a hapless programmer be sure of the problem i.e if its actually a memory leak or queuing of signal slot connections?