diff options
author | Colin Snover | 2017-11-15 16:24:37 -0600 |
---|---|---|
committer | Eugene Sandulenko | 2017-11-18 22:35:12 +0100 |
commit | bb26bf7994420a8af3fd5e1c3a1b174448aefc5c (patch) | |
tree | 5fb930b752f2668f8cd2a120d89dffa96f608e51 /engines/fullpipe/motion.h | |
parent | ca5a86e703d3fe72cc370845622097ee16f4d67e (diff) | |
download | scummvm-rg350-bb26bf7994420a8af3fd5e1c3a1b174448aefc5c.tar.gz scummvm-rg350-bb26bf7994420a8af3fd5e1c3a1b174448aefc5c.tar.bz2 scummvm-rg350-bb26bf7994420a8af3fd5e1c3a1b174448aefc5c.zip |
FULLPIPE: Fix memory leaks and unnecessary indirect allocations in Motion and Sc2
Diffstat (limited to 'engines/fullpipe/motion.h')
-rw-r--r-- | engines/fullpipe/motion.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index c86c161b09..2a1450eb71 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -84,15 +84,15 @@ public: class MctlItem : public CObject { public: - MotionController *_motionControllerObj; - MovGraphReact *_movGraphReactObj; + Common::ScopedPtr<MotionController> _motionControllerObj; + Common::ScopedPtr<MovGraphReact> _movGraphReactObj; Common::Array<MctlConnectionPoint *> _connectionPoints; int _field_20; int _field_24; int _field_28; public: - MctlItem() : _movGraphReactObj(0), _motionControllerObj(0), _field_20(0), _field_24(0), _field_28(0) {} + MctlItem() : _field_20(0), _field_24(0), _field_28(0) {} ~MctlItem(); }; @@ -120,7 +120,7 @@ public: void replaceNodeX(int from, int to); uint getMotionControllerCount() { return _motionControllers.size(); } - MotionController *getMotionController(int num) { return _motionControllers[num]->_motionControllerObj; } + MotionController *getMotionController(int num) { return _motionControllers[num]->_motionControllerObj.get(); } }; struct MctlLadderMovementVars { @@ -414,11 +414,10 @@ public: int _mctlflags; int _mctlstatic; int16 _mctlmirror; - MessageQueue *_messageQueueObj; + Common::ScopedPtr<MessageQueue> _messageQueueObj; int _motionControllerObj; MctlConnectionPoint(); - ~MctlConnectionPoint(); }; } // End of namespace Fullpipe |