Functions such as filesystem access, network programming, process and thread management, and shared memory are supported in
a low-level, cross-platform library. That is just the main purpose of APR, it is as a portable, platform-independent layer for
applications.
The APRU (APR-UTIL) is a second library in the APR project. In provides a small set of utilities, based on the APR and with
a unified programming interface. It doesn't have separate per-platform modules, but it does adopt a similar approach to some
other commonly used resources, such as dtabases.
The APR pools provides an alternative model for resource management. Like garbage collection, they liberate the programmer
from the complexities of dealing with cleanups in all possible cases. In addition, they offer several other advantages, including
full control over the lifetime of resources and the ability to manage heterogeneous resources.
Whenever you allocate a resource that requires cleanup, you register it with a pool. The pool then takes responsibility for
the cleanup, which will happen when the pool itself is cleaned. In this way, the problem is reduced to one of allocating and cleaning
up a single resource: the pool itself. Given that the Apache pools are managed by the server itself, the complexity is, therefore,
removed from applications programming. All the programmer has to do is select the appropriate pool for the required lifetime of
a resource.
a low-level, cross-platform library. That is just the main purpose of APR, it is as a portable, platform-independent layer for
applications.
The APRU (APR-UTIL) is a second library in the APR project. In provides a small set of utilities, based on the APR and with
a unified programming interface. It doesn't have separate per-platform modules, but it does adopt a similar approach to some
other commonly used resources, such as dtabases.
The APR pools provides an alternative model for resource management. Like garbage collection, they liberate the programmer
from the complexities of dealing with cleanups in all possible cases. In addition, they offer several other advantages, including
full control over the lifetime of resources and the ability to manage heterogeneous resources.
Whenever you allocate a resource that requires cleanup, you register it with a pool. The pool then takes responsibility for
the cleanup, which will happen when the pool itself is cleaned. In this way, the problem is reduced to one of allocating and cleaning
up a single resource: the pool itself. Given that the Apache pools are managed by the server itself, the complexity is, therefore,
removed from applications programming. All the programmer has to do is select the appropriate pool for the required lifetime of
a resource.