Thaddy, thanks for providing this implementation.
You forgot to free the matrices A, b, x, which gives a memory leak.
Also the TMatrix destructor is redundant, since the compiler already inserts code to clean up the dynamic arrays when they go out of scope.