Oh, the extracted char data is in fact sort of necessary in the SMAUG design, due to the fact that while you're processing a character, it might die and you still might need it around.
You could argue that that's poor design - i.e. if a character dies you should be done with it - but, well, what can you say. :)
I actually do something similar in my new network code, but for slightly different reasons. When a socket is 'removed', it gets pushed onto a 'to delete' queue. At the end of every cycle, the game cleans up that queue, removing items from the main queue. The reason I need to do this is because when you iterate through the STL list, if you remove the iterator you're working on from the list, bad things can happen like no longer being able to iterate! I never access the socket again; I just need to have it (and the iterator) lying around until the end of the loop so that nothing gets broken. Nick implemented a little foreach version that technically fixes this problem (of deleting the iterator you're working on and thereby breaking your iteration), but I haven't been bothered to put it in my code yet. :P
The extra memory used up is minimal... I haven't counted it or anything but it's probably no more than 20 bytes per queue entry. That's not too bad is it :)
That extract_char bug is actually pretty useful in debugging your OWN code, I found, not SMAUG's. Sometimes, if you forget to use the magic words - separate_obj, char_from_room, whatever - and then do things like extract_char/obj on them, you can get strange results. I once somehow (don't ask me how) had an infinite loop (without actually having a loop) of extracting an object which was extracting its char which was extracting its objects... again. Riiiight... so yeah, I think that's why those checks are there.
if ( ch == cur_char && cur_char_died )
return TRUE;
Now here, for example, the problem I have is that why have two separate kinds of checks to see if the char died? Why is it not sufficient to loop through the extracted char list? Is there a time when the char is killed but not extracted?
I think the answer to this is that when players die, they don't get destroyed and respawn instead. This means, if my memory serves me, that they don't actually ever get pushed onto the extracted queue, which is therefore only used for mobs (or players who actually quit.) Therefore, this 'magic code' is probably used to check if a player died, and if so not do operations on them after they've respawned if they're the one being processed.
Still, I tend to think this is pretty bad form, as a function should know that whatever it is acting on died, without needing a global variable. *mutter*