For SGMatrix (and a couple of other two classes) we have automatic reference counting. Create this variable using 
`m_points = SGMatrix<float64_t>(rows,cols,true);` (without the call to new).

Right now this actually leaks memory in fact.