Life of objects allocated using the request pool?

What is the life of objects allocated using the request pool? If I
allocate
memory from the r->pool in a request handler, what would be the life of
the
object? Will the objects be freed if the request is over of will it
sustain
over multiple requests?

Hello!

On Wed, Jun 11, 2014 at 12:26:03PM +0530, Adarsh P. wrote:

What is the life of objects allocated using the request pool? If I allocate
memory from the r->pool in a request handler, what would be the life of the
object? Will the objects be freed if the request is over of will it sustain
over multiple requests?

The request pool is destroyed with the request, and no objects
allocated from the pool can be used after this.

That’s actually the whole point: allocations from a pool don’t need
to be freed individually, it’s enough to destroy the pool itself.


Maxim D.
http://nginx.org/