| 1 | <?php |
||
| 9 | class Allocation |
||
| 10 | { |
||
| 11 | private $releaseFn; |
||
| 12 | private $size; |
||
| 13 | |||
| 14 | public function __construct($releaseFn, $size) |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Releases a single resource from this allocation |
||
| 22 | */ |
||
| 23 | public function releaseOne() |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Releases all resources from this allocation |
||
| 30 | */ |
||
| 31 | public function releaseAll() |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Releases the specified number of resources from this allocation |
||
| 40 | * |
||
| 41 | * @param int $count |
||
| 42 | */ |
||
| 43 | public function release($count) |
||
| 54 | } |
||
| 55 |