Ticket #4011 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Fix the obvous memory leaks shown by cppcheck

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: major Milestone: Release 2.0
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Jose Borreguero

Description

When setting up the Jenkins cppcheck it gave some very obvious memory leaks

Code/Mantid/Framework/CurveFitting/src/Convolution.cpp	86	memleak	error	Memory leak: xr
Code/Mantid/Framework/DataHandling/src/SaveToSNSHistogramNexus.cpp	594	memleak	error	Memory leak: tof_data
Code/Mantid/MantidPlot/src/FFT.cpp	101	memleak	error	Memory leak: amp
Code/Mantid/MantidPlot/src/Interpolation.cpp	182	memleak	error	Memory leak: ytemp
Code/Mantid/MantidPlot/src/Interpolation.cpp	182	memleak	error	Memory leak: xtemp
Code/Mantid/Vates/VatesAPI/src/vtkThresholdingHexahedronFactory.cpp	284	memleak	error	Memory leak: pointIDs
Code/Mantid/Vates/VatesAPI/src/vtkThresholdingHexahedronFactory.cpp	284	memleak	error	Memory leak: voxelShown
Code/Mantid/Vates/VatesAPI/src/vtkThresholdingHexahedronFactory.cpp	284	memleak	error	Memory leak: pointNeeded
Code/Mantid/Vates/VatesAPI/src/vtkThresholdingQuadFactory.cpp	200	memleak	error	Memory leak: pointIDs
Code/Mantid/Vates/VatesAPI/src/vtkThresholdingQuadFactory.cpp	200	memleak	error	Memory leak: voxelShown
Code/Mantid/Vates/VatesAPI/src/vtkThresholdingQuadFactory.cpp	200	memleak	error	Memory leak: pointNeeded
Code/Mantid/Framework/CurveFitting/src/Convolution.cpp	196	mismatchAllocDealloc	error	Mismatching allocation and deallocation: tmp
Code/Mantid/Framework/DataHandling/src/SaveISISNexus.cpp	363	mismatchAllocDealloc	error	Mismatching allocation and deallocation: buff

They are easy to fix as cppcheck gives the exact line where the leak happens.

Change History

comment:1 Changed 9 years ago by Martyn Gigg

Refs #4011. Fix some obvious memory leaks picked up by cppcheck.

Changeset: edc416def81f74aed888168d48aed945d58b66a3

comment:2 Changed 9 years ago by Martyn Gigg

Refs #4011. Fix more obvious memory leaks picked up by cppcheck.

Changeset: e87573c9ad4917b478bfea0827f1ee6eb04eb54a

comment:3 Changed 9 years ago by Martyn Gigg

  • Status changed from new to accepted

comment:4 Changed 9 years ago by Martyn Gigg

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:5 Changed 9 years ago by Jose Borreguero

  • Status changed from verify to verifying
  • Tester set to Jose Borreguero

comment:6 Changed 9 years ago by Jose Borreguero

  • Status changed from verifying to closed

comment:7 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4858

Note: See TracTickets for help on using tickets.