I have this function:

Code:
Matrix* EffectParameter::GetMatrix()
{
	Matrix temp;
	effect->GetEffect()->GetMatrix(handle, &temp);
	return &temp;
}

The question is, will the pointer returned by the function point to the valid memory. Or will the temp variable fall out of the function's scope and risk getting over written and than making the pointer point to random memory?