Skip to content

Datafilter memory leak #4249

Closed
Closed
@liversedge

Description

Datafilters allocate a lot of memory and are never cleared, fortunately the data they manipulate and create are stored in Result objects that are created and deleted appropriately (generally on the stack).

Some of the more obvious issues:

  • clearFilter never gets called in practice, there is no DataFilter::~DataFilter method for a start
  • the leaf::clear() method is out of date and does not reflect the multitude of new types of Leaf, nor how the lvalue/rvalue are used/not used
  • the runtime object is manipulated by UserMetrics in a spooky action at a distance way (that needs to be addressed)

There is likely a number of other issues hidden in the code- this defect needs to be reviewed in detail.

One example of how to test this:

  • add a DataFilter destructor that calls clearFilter
  • switch to trends view
  • a SEGV will occur since SearchFilterBox::matches allocates a Datafilter on the stack, causing the delete method to be called as it goes out of scope

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions