mirror of
https://github.com/storytold/LiveScan3D.git
synced 2026-10-09 00:09:58 +00:00
Merge pull request #13 from JacekNaruniec/master
Fixed a memory leak and a warning.
This commit is contained in:
@@ -99,6 +99,7 @@ bool KinectCapture::AcquireFrame()
|
|||||||
GetBodyFrame(pMultiFrame);
|
GetBodyFrame(pMultiFrame);
|
||||||
GetBodyIndexFrame(pMultiFrame);
|
GetBodyIndexFrame(pMultiFrame);
|
||||||
|
|
||||||
|
SafeRelease(pMultiFrame);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -202,7 +203,12 @@ void KinectCapture::GetBodyFrame(IMultiSourceFrame* pMultiFrame)
|
|||||||
bodies[i]->GetJoints(JointType_Count, joints);
|
bodies[i]->GetJoints(JointType_Count, joints);
|
||||||
|
|
||||||
vBodies[i].vJoints.assign(joints, joints + JointType_Count);
|
vBodies[i].vJoints.assign(joints, joints + JointType_Count);
|
||||||
vBodies[i].bTracked = isTracked;
|
|
||||||
|
if (isTracked == TRUE)
|
||||||
|
vBodies[i].bTracked = true;
|
||||||
|
else
|
||||||
|
vBodies[i].bTracked = false;
|
||||||
|
|
||||||
vBodies[i].vJointsInColorSpace.resize(JointType_Count);
|
vBodies[i].vJointsInColorSpace.resize(JointType_Count);
|
||||||
|
|
||||||
for (int j = 0; j < JointType_Count; j++)
|
for (int j = 0; j < JointType_Count; j++)
|
||||||
|
|||||||
Reference in New Issue
Block a user