It seems that the code spStripFills() only unlink the fill in elements. Does Sparse try to reuse them anywhere? What is a calling sequence with spStripFills() and other functions?
On the other hand, all fill ins will be freed since it is registered. So this is not a memory leaking problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear Kundert, thanks for your replies to my questions. I have been reading your code since the day before yesterday. I like this well designed program. Would you please suggest a calling sequence involving spStripFills()? I am trying to understand this piece from spGetFillin(), especially how could (Matrix->LastFillinListNode->Next != NULL)?
if (Matrix->FillinsRemaining == 0)
{ pListNode = Matrix->LastFillinListNode;
You normally do not need to use spStripFills. You would only use it if you feel that the matrix became bloated with fillins, perhaps because earlier matrices became ill-conditioned.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems that the code spStripFills() only unlink the fill in elements. Does Sparse try to reuse them anywhere? What is a calling sequence with spStripFills() and other functions?
On the other hand, all fill ins will be freed since it is registered. So this is not a memory leaking problem.
Yes, it will reuse them.
Dear Kundert, thanks for your replies to my questions. I have been reading your code since the day before yesterday. I like this well designed program. Would you please suggest a calling sequence involving spStripFills()? I am trying to understand this piece from spGetFillin(), especially how could (Matrix->LastFillinListNode->Next != NULL)?
if (Matrix->FillinsRemaining == 0)
{ pListNode = Matrix->LastFillinListNode;
if (pListNode->Next != NULL)
{ Matrix->LastFillinListNode = pListNode = pListNode->Next;
Matrix->FillinsRemaining = pListNode->NumberOfFillinsInList;
Matrix->NextAvailFillin = pListNode->pFillinList;
}
You normally do not need to use spStripFills. You would only use it if you feel that the matrix became bloated with fillins, perhaps because earlier matrices became ill-conditioned.