Using Instruments with the Leaks/Allocations combo I found that memory was being leaked by AMSampleCamera::createMoveToSampleAction. This was actually a leak in AMSampleMoveAction, which use the AMSampleCamera call to get a list action, but never cleaned it up. Clean up is now done in the destructor of AMSampleMoveAction using a deleteLater() call protected by a check on the moveListAction_ pointer.
Merge branch 'Issue954' of github.com:acquaman/acquaman into Issue954
Using Instruments with the Leaks/Allocations combo I found some leaks in the loadCamera/Beam/RotationalOffset() calls. Fixed up some hanging bools that weren't cleaned up. Also made sure that AMSampleCamera cleans up the old beam model if a new one is set.
Fixed a few more instances of QVectors being allocated incorrectly and appended to. Done some simple testing and appears to be working.
Using Instruments with the Leaks/Allocations combo I found the motherload. Finally figured out how to get the call tree and found that AMSampleCameraView::drawSamplePlate() and AMSampleCameraView::createIntersectionShapes() were orphaning all of the QGraphicsPolygonItem pointers they were creating. The call was being made to the scene to remove them using removeItem(), but this leaves the caller responsible for cleaning up the memory, which was never happening. I've implemented the deletion in AMSampleCameraView::clearIntersections() (which does the clearing for AMSampleCameraView::createIntersectionShapes()) and directly in AMSampleCameraView::drawSamplePlate(). I've tested it and it appears to work just fine and the memory leaking is down dramatically.