A basic question about linked list
- From: veda <kedar.hardikar@xxxxxxxxx>
- Date: Wed, 18 Jul 2007 22:30:11 -0000
Hi,
I want to know the correct procedure for deallocating memory that gets
allocated during creation of a linked list (I am using CVF).
I want to create a linked list of "segments" which goes something like
this -
type face_1d
double precision, dimension(2):: pt1, pt2
end type
type curve
type(face_1d):: facet
type(curve), pointer::next
end type curve
..............................
in main , I have
type(curve), pointer:: head
type(curve), pointer::tail
type(curve), pointer::ptr_temp
Now I write some code to populate the linked list. First element is
pointed to by head and the last is tail. Then do some calculations.
Later in the code, I want to re-define the curve identified by
"head" (e.g. all together different set of segments). What do I need
to do to deallocate memory correctly for the previously defined curve
before starting to define the new curve?
This may be a very basic question for linked list. Pardon my
ignorance. Any help is greatly appreciated.
Thanks.
Veda.
.
- Follow-Ups:
- Re: A basic question about linked list
- From: glen herrmannsfeldt
- Re: A basic question about linked list
- Prev by Date: random_seed
- Next by Date: Re: random_seed
- Previous by thread: random_seed
- Next by thread: Re: A basic question about linked list
- Index(es):