Dear all,
I encountered some memory leaks in EIGEN.
Memory leaks are detected by valgrind and actually rather
violent in running the program (I had to use "ulimt -Sv 1000000"
in order to avoid freezing of my laptop).
To avoid typing Eigen::Dynamic all the time, I have chosen:
template <typename T> using MyVector=Eigen::Matrix<T,Eigen::Dynamic,1>;
template <typename T> using MyMatrix=Eigen::Matrix<T,Eigen::Dynamic,Eigen::Dynamic>;
and the type "T" is gmp_class from the GMP library, i.e.
infinite precision rational arithmetic.
I obtain the leak by writing
MyVector<T> V1=eMat.row(iRow);
I eliminate the leak by doing
MyVector<T> V1(nbCol);
V1=eMat.row(iRow);
I have also other memory leakage related to eigen but not as clear
cut as this one.
Used compiler is g++ 4.8.2 and g++ 4.9.2 (exactly same problem).
Mathieu