This forum has been archived. All content is frozen. Please use KDE Discuss instead.

very simple question

Tags: None
(comma "," separated)
grekop
Registered Member
Posts
10
Karma
0

very simple question

Mon Apr 05, 2010 4:49 pm
How do I free the memory that is used by a Matrix?
User avatar
bjacob
Registered Member
Posts
658
Karma
3

Re: very simple question

Mon Apr 05, 2010 4:55 pm
The memory is automatically freed when the Matrix object is destroyed, i.e. when either it goes out of scope or it is explicitly delete'd.

If you want to almost completely free the memory used by your matrix, do: matrix.resize(0,0) .... wait, I'm not 100% sure at the moment that this is allowed, so just try it, 99% chances that it works, otherwise do matrix.resize(1,1) and i'm going to fix that.


Join us on Eigen's IRC channel: #eigen on irc.freenode.net
Have a serious interest in Eigen? Then join the mailing list!


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]