Hi again, Ramkumar Ramachandra writes: > > I think you've got your pointers confused. Can you drop the pstrdup(), > > see that nothing breaks, and then we can discuss why nothing broke? > > Hehe, I wouldn't be surprised if this is the case -- I've been working > with APR pools day and night now :p > > Okay, I'll drop this during the cleanup. Do explain this to me though :)
Just to be clear: I know that nothing will break. Memory for the string "/" will be allocated statically by the compiler- its lifetime is therefore the lifetime of the program, and it cannot be freed before that. I made this change merely for the purpose of elegance- except in this case, abspath always points to a dynamically allocated memory location owned by a `pool` that can be freed. So I thought: why not make make it always point to a dynamically allocated memory location? Does that make sense or am I just being silly? :p -- Ram