Project

General

Profile

Actions

Bug #911

closed
KD

WAbstractItemView::setModel(WAbstractItemModel *model) memory leak

Bug #911: WAbstractItemView::setModel(WAbstractItemModel *model) memory leak

Added by Anonymous about 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
07/21/2011
Due date:
% Done:

0%

Estimated time:

Description

WAbstractItemView::setModel(WAbstractItemModel *model)

has a memory leak

in
WItemSelectionModel *oldSelectionModel = selectionModel_;
selectionModel_ = new WItemSelectionModel(model, this);
selectionModel_setSelectionBehavior(oldSelectionModel>selectionBehavior());

as oldSelectionModel is not deleted

KD Updated by Koen Deforche about 15 years ago Actions #1

  • Status changed from New to Resolved
  • Assignee set to Koen Deforche
  • Target version set to 3.1.11

Hey,

It isn't actually a memory leak in the sense that because of WObject ownership rules, the old selection model will be deleted together with the itemview. But the old selection model can be deleted right away in this case. I've fixed this in my git copy.

Regards,
koen

KD Updated by Koen Deforche almost 15 years ago Actions #2

  • Status changed from Resolved to Closed

Resolved in Wt 3.1.11

Actions

Also available in: PDF Atom