Bug #2282
closedPossible memory leak in WTableView
0%
Description
I use WT version 3.3.0.
During tests I observed that the memory of the webserver was increasing.
After a more detailed analysis it seems that the memory leak is related to the WTableView.
When adding data to a WStandardItemModel via insertColumn and removing this data with clear method of the model, it seems that the connected WTableView is not releasing memory when clear of the model is executed.
As soon as the model is not assinged to the view the memory doesn't increase.
see attached example.
Files
Updated by Koen Deforche about 11 years ago
- Status changed from New to InProgress
- Assignee set to Korneel Dumon
- Target version set to 3.3.1
Korneel,
Can you see if this is still a problem with 3.3.1?
koen
Updated by Korneel Dumon about 11 years ago
I don't see any increase in memory usage running your example with Wt 3.3.1, it would be helpful if you can verify this with the release candidate.
Updated by Andreas Büchin about 11 years ago
- File wittyTest2_3.3.1-rc2.png wittyTest2_3.3.1-rc2.png added
I just tested it with Wt 3.3.1-rc2.
I stated the application in eclipse to be profiled with valgrind. After that I opened a browser and waited for about 5 min until I stopped the profiling (See attached log).
The memory is still increasing.
I used following cmake flags for building the Wt library:
-DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_SHARED_LIBS=ON -DCONNECTOR_FCGI=OFF -DCONNECTOR_HTTP=ON -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DMULTI_THREADED=ON -DENABLE_SQLITE=OFF -DENABLE_POSTGRES=OFF -DENABLE_SSL=OFF
was checked with boost version 1.46 and gcc 4.6 and in addition with
gcc 4.7 and boost version 1.54
Updated by Korneel Dumon about 11 years ago
ok, thanks, I dismissed it too quickly.
It seems the problem is that we're always adding css-rules every time the table-view is rebuild and we never remove them. This is also visible in the browser, in firebug I see lots of identical css-rules.
The issues are in: WAbstractItemView::initDragDrop(), WAbstractItemView::ColumnInfo::ColumnInfo(const WAbstractItemView *view, int anId)
I will discuss a fix with Koen.
Korneel
Updated by Koen Deforche about 11 years ago
- Target version changed from 3.3.1 to 3.3.2
Updated by Korneel Dumon about 11 years ago
- Status changed from InProgress to Resolved
Updated by Koen Deforche almost 11 years ago
- Status changed from Resolved to Closed