Ticket #3765 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Odd memory management

Reported by: Owen Arnold Owned by: Janik Zikovsky
Priority: major Milestone: Release 2.0
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Russell Taylor

Description

Probably a minor point, but this is going to provide a source of memory managment issues. Invites double deallocations.

MDGeometry getTransformFromOriginal should release pointer if it's going to expose it like this. This is asking for trouble. Better to follow RAII where we can.

--------------------------------------------------------------------------------------------------- / @return Coordinate Transformation that goes from the original workspace to this workspace's coordinates. Mantid::API::CoordTransform * MDGeometry::getTransformFromOriginal() const {

return m_transformFromOriginal.get();

}

Change History

comment:1 Changed 9 years ago by Janik Zikovsky

  • Milestone changed from Iteration 30 to Iteration 31

comment:2 Changed 9 years ago by Janik Zikovsky

  • Status changed from new to accepted

comment:3 Changed 9 years ago by Janik Zikovsky

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

[14926] fixed this. Post-commit hook failed.

comment:4 Changed 9 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:5 Changed 9 years ago by Russell Taylor

  • Status changed from verifying to closed

Looks OK.

Note that it's safe to call delete on a null pointer, so the checks in the destructor are redundant.

comment:6 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4614

Note: See TracTickets for help on using tickets.