Re: Whats going onto the stack here?
- From: "Callum Winter" <Spam not required>
- Date: Mon, 5 Mar 2007 20:13:57 -0000
Hi Igor,
Thanks for the quick response.
So don't delete them recursively, delete them iteratively.
D'Oh!, I have now changed to iterative deletion of the linked list. No more
stack overflows, Thanks.
Every function call needs some stack space for return address, saving
registers, and local variables
I see, so as its recursively deleting its storing the return address plus
other various data for each object on the stack meaning it runs out of room
before it manages to delete the whole list, and unwind itself.
Makes sense.
Having said all this, why are you writing your own linked list class in
this day and age? Why not use stl::list ?
It only takes 5 minutes to throw together a linked list, hardly re-inventing
the wheel. I never learnt stl; plus it looks a mess. Im sure people will say
its not hard, but i find it easier writing my own code for small things like
this.
Thanks for your help, its much appreciated.
.
- Follow-Ups:
- Re: Whats going onto the stack here?
- From: Tim Roberts
- Re: Whats going onto the stack here?
- From: Igor Tandetnik
- Re: Whats going onto the stack here?
- References:
- Whats going onto the stack here?
- From: Callum Winter
- Re: Whats going onto the stack here?
- From: Igor Tandetnik
- Whats going onto the stack here?
- Prev by Date: Re: Whats going onto the stack here?
- Next by Date: Re: security issues with a dll
- Previous by thread: Re: Whats going onto the stack here?
- Next by thread: Re: Whats going onto the stack here?
- Index(es):