I was reviewing the code at the following two sites. I noticed that memory allocation "new" has been used to allocate space for the Node(s). How are they freed?. very good codes.

http://visualcsamples.blogspot.com/2010/11/sparse-matrix.html
http://www.syntax-example.com/Code/implement-subtract-function-big-number-992.aspx

Memory allocated with new can be de-allocated with delete
Wikipedia Article
One thing to note is that array allocated with new[] must be deallocated with delete[]

int integer = new int;
int* pointer = &integer;
delete pointer;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.