> well, I think originally doug who has written that entry meant that > server_root_relative should be able to figure out which pool to use on > its own. I could be wrong. Your proposed change makes the API more > complex (though it now maps 1:1 to the C API) and incompatible with mp1.
well, I thought it was the API we had agreed upon in vegas :) > > What do you think about the following: keep things as they are now - > i.e. you can call $r->server_root_relative(), > $c->server_root_relative(), etc. but if you call > Apache::server_root_relative() it'll just use APR::Pool->new (in C of > course) behind the scenes? hmm, ok, let me think about that. > We discussed several times about having a > state variable/function which can tell us which phase we are in, so > later on if we implement it we could assist ourselves using it and for > example pick pconf if we figure that we are in one of the startup phases. ugh. >> anyway, I added a few tests, including one that destroys the pool then >> attempts to reuse the SV. everything passes for me on worker, including >> t/SMOKE but I could use another set of eyes. > > > I think it just happens to work for you, since the freed memory wasn't > overwritten by somebody else. yeah, that was what I was afraid of. > Notice that we need to ensure the copy only if use APR::Pool->new, with > any other pool it's the responsibility of the user not to use that > variable after the pool is gone. Oh, may be it's a bad assumption and we > should always copy it. The biggest problem with not copying is that > users will have hard time tracking this issue down, if they use a > variable after the pool has gone out of scope. Sometimes it will work > (if the freed memory is still free), sometimes it won't (and crash). ok, it's easy enough to return a copy. but lemme give it some more thought. I really don't mind making it a class method only and passing in a pool, though :) thanks for the feedback. --Geoff --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]