I have a dolfin::Matrix, which is a big one, say global stiffness matrix. But after solving the linear equations, this is not needed. I would like to clear it for saving storage. Could anyone tell me how to get it? Thanks.
XZ
Reset a smart pointer to your matrix or let the matrix come out of scope.
THank you. If I use a shared_ptr spm to create a matrix spm(new Matrix), after spm->reset() operation, the pointer will NOT point to the matrix, but will the matrix still remain in the memory? I think the smart pointer can automatically delete it, but not sure.
Yes, the object is deleted whenever its reference count becomes zero.