Ticket #8361 (closed: fixed)
Clear memory leaks in the API package
Reported by: | Russell Taylor | Owned by: | Russell Taylor |
---|---|---|---|
Priority: | major | Milestone: | Release 3.2 |
Component: | Framework | Keywords: | Maintenance |
Cc: | Blocked By: | #8357 | |
Blocking: | Tester: | Wenduo Zhou |
Description
The SNS Jenkins has a valgrind job which checks the API code in so far as it is exercised by the unit tests.
Using this job and/or valgrind runs of your own, eliminate all the leaks/errors that result from code in the API package - i.e. under Framework/API/inc/MantidAPI or Framework/API/src.
Note that this should be done after leaks coming out of the test code have been addressed (#8357).
Change History
comment:1 Changed 7 years ago by Russell Taylor
- Owner set to Russell Taylor
- Milestone changed from Backlog to Release 3.2
comment:2 Changed 7 years ago by Nick Draper
- Status changed from new to assigned
Bulk move of tickets out of triage (new) to assigned at the introduction of the triage state
comment:3 Changed 7 years ago by Russell Taylor
- Status changed from assigned to inprogress
Re #8361. Fix memory leak by ensuring temporary array is deleted.
Changeset: edbadfca3a6f9697aa965e1d1b7bdeaf08fb238d
comment:4 Changed 7 years ago by Russell Taylor
Re #8361. Ensure temporary heap-allocated object is deleted.
Changeset: cd60e936aae51e80b6c78dab8d86c23e4d79d900
comment:5 Changed 7 years ago by Russell Taylor
Re #8361. Delete instantiator in case of an exception being thrown.
The factory takes ownership of the injected instantiator object so is responsible for deleting it if an exception is going to be thrown and the algorithm will not end up being subscribed.
Changeset: f689caf7e9cc3807bccd989c75ba62de32e4c22f
comment:6 Changed 7 years ago by Russell Taylor
Re #8361. No need to check for a null pointer before calling delete.
Changeset: 9ca018c2c8980b51f855e6750dded3decc771e6f
comment:7 Changed 6 years ago by Russell Taylor
Re #8361. Move heap allocation after ParameterReference creation.
The ParameterReference constructor can throw, which was leaking the new'd double.
Changeset: dd7e7025640081d749d770347d3b6e8b246e5f17
comment:8 Changed 6 years ago by Russell Taylor
Re #8361. Fix memory leaks seen when calling copying a Sample.
The copied Surface objects in the Object were being leaked as it seems the correct way to fill the surface list is with existing Surface objects held within the 'TopRule' member.
Changeset: 4a3c80bab567e8331500d5a35cb381fb61c5c77f
comment:9 Changed 6 years ago by Russell Taylor
Re #8361. Suppress a leak in Nexus's house.
This may be a third-party library we are close to, but it's still a third-party library so we don't want its problems to obscure our own.
Changeset: 6624e2cb806536a1fcce26217a822b1a24fb133a
comment:10 Changed 6 years ago by Russell Taylor
- Status changed from inprogress to verify
- Resolution set to fixed
No memory leaks from API (or Kernel, Geometry & DataObjects) any longer. See http://builds.mantidproject.org/view/Valgrind/job/valgrind_develop_core_packages/
comment:11 Changed 6 years ago by Wenduo Zhou
- Status changed from verify to verifying
- Tester set to Wenduo Zhou
comment:12 Changed 6 years ago by Wenduo Zhou
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/bugfix/8361_api_memory_leaks'
Full changeset: 7e66eb720f86c4d06cdd0fdc4a89c4cdb6c74c9d
comment:13 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 9206