I use my own Matrix class. A function returns a local Matrix-class object I've created in it("Matrix aa;"
. But before returning it ("return aa;"
the destructor is called and I return a void object. Then after the return operation the destructor is called again. I don't know why and I thought that the destructor is only called at the end of my function.