December 5th Wednesday (十二月 五日 水曜日)

  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.
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值