|
Ublas : |
From: Gunter Winkler (guwi17_at_[hidden])
Date: 2007-01-30 12:04:40
On Tuesday 30 January 2007 17:47, Eddie.Vedder_at_[hidden] wrote:
> Hello readers of this list,
>
> I have a problem concering the memory usage of ublas.
> Within a class I have some members of type ublas::matrix<double> and
> ublas::vector<double>. These matrices are sometimes very large. After the
> computation I try to deallocate the memory calling clear(), but a look at
> the Task-Manager does not show less memory used by the application after
> that call.
clear() clears the matrix elements (sets all elements to zero) but not the
memory. You should use resize(0,0) or assign_temporary(matrix<double>(0,0));
(The latter works with all matrices. The resize() method may decide not to
free the memory ...)
Another problem is, that the memory management of your C-Library may not free
the memory but keep it for later use ...
mfg
Gunter