Bug regarding Matrix return

I found one bug
I initialized one matrix inside one function and returned through function
then i get that returned matrix.
I found that matrix elements gets deleted
below is demo code

Mat testDouble()
		double transVals[] = { 10.0, 20.0, 30.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 };
		Mat translationMat(3, 3, CV_64F, &transVals);
		cout << "translationMat:" << translationMat << endl;
		return translationMat;

	void main()
		Mat testMat = testDouble();
		cout << "testMat:" << testMat << endl;

Following is the output values after testDouble is junk

known behaviour, not a bug.
this constructor:

does neither allocate own memory, nor does it add refcounts.
(indeed the mem is invalid, once it leaves the function scope)
please return translationMat.clone(); in that case.

Thank you i will check