This topic is now archived and is closed to further replies.

Memory Leak in D3DXIntersect?

This topic is 5173 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m calling this function for my ColDet by using:
bool PointInRoom(D3DXVECTOR3 pos)
	D3DXVECTOR3 up = D3DXVECTOR3(0.0f, 1.0f, 0.0f);
	BOOL bHit;
    DWORD dwFace;
    FLOAT fBary1, fBary2, fDist;
	DWORD count;
	D3DXIntersect(g_Room.m_pMesh, &pos, &up, &bHit, &dwFace, &fBary1, &fBary2, &fDist, &idb, &count);
	if(count%2) return true;
	else return false;
	idb = NULL;
	return 1;
and it''s causing quite a memory leak. I assume it''s my code and not the function but I''m not 100% sure on why.

Share this post

Link to post
Share on other sites