aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node/dicerollernode.cpp
diff options
context:
space:
mode:
authorRenaud G <renaud@rolisteam.org>2015-04-08 21:34:02 +0200
committerRenaud G <renaud@rolisteam.org>2015-04-08 21:34:02 +0200
commit5cfe48265ebad0ffa0a980dbc2d131fceeecdf3b (patch)
tree0d8d654046e18ad90a7a06e00e0e56c375a230fd /node/dicerollernode.cpp
parent9192ba51a362715061cce1104b5543f7e93bf70f (diff)
downloadOneRoll-5cfe48265ebad0ffa0a980dbc2d131fceeecdf3b.tar.gz
OneRoll-5cfe48265ebad0ffa0a980dbc2d131fceeecdf3b.zip
-remove memory leaks
-delete created objects
Diffstat (limited to 'node/dicerollernode.cpp')
-rw-r--r--node/dicerollernode.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/node/dicerollernode.cpp b/node/dicerollernode.cpp
index 1fd1a2f..f32a033 100644
--- a/node/dicerollernode.cpp
+++ b/node/dicerollernode.cpp
@@ -33,11 +33,9 @@
/// \brief DiceRollerNode::DiceRollerNode
//////////////////////////////////////////////////
DiceRollerNode::DiceRollerNode(quint64 faces)
- : m_faces(faces),m_myDiceResult(new DiceResult())
+ : m_faces(faces),m_diceResult(new DiceResult())
{
- m_mutex=new QMutex();
- m_result=m_myDiceResult;
-
+ m_result=m_diceResult;
}
void DiceRollerNode::run(ExecutionNode* previous)
{
@@ -55,7 +53,7 @@ void DiceRollerNode::run(ExecutionNode* previous)
Die* die = new Die();
die->setFaces(m_faces);
die->roll();
- m_myDiceResult->insertResult(die);
+ m_diceResult->insertResult(die);
}
if(NULL!=m_nextNode)
{