Server IP : 66.29.132.124 / Your IP : 3.147.45.16 Web Server : LiteSpeed System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : wavevlvu ( 1524) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/wavevlvu/book24.ng/vendor/aws/aws-crt-php/src/AWS/CRT/ |
Upload File : |
<?php /** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ namespace AWS\CRT; use AWS\CRT\CRT as CRT; /** * Base class for all native resources, tracks all outstanding resources * and provides basic leak checking */ abstract class NativeResource { protected static $crt = null; protected static $resources = []; protected $native = null; protected function __construct() { if (is_null(self::$crt)) { self::$crt = new CRT(); } self::$resources[spl_object_hash($this)] = 1; } protected function acquire($handle) { return $this->native = $handle; } protected function release() { $native = $this->native; $this->native = null; return $native; } function __destruct() { // Should have been destroyed and released by derived resource assert($this->native == null); unset(self::$resources[spl_object_hash($this)]); } }