Open
Description
I'm looking into a memory problem for a customer of mine and I came across this:
PHP Opencloud seems to be using quite some memory. I've tested it with the code below. It outputs '1048576' which happens to be exactly 1024 * 1024. I've been looking for some kind of destroy function, similar to PHP's GD library, but I can't seem to find one.
I don't know enough about PHP's memory management to troubleshoot this any further. I hope you guys have a clue ;-)
$mem = memory_get_usage(true);
$connection = new \OpenCloud\OpenStack(
'https://identity.stack.cloudvps.com/v2.0/',
[
'username' => '*SNIP*',
'password' => '*SNIP*',
'tenantName' => '*SNIP*'
]
);
$service = $connection->objectStoreService('swift', 'NL', 'internalURL');
$container = $service->getContainer('test');
$test = $container->objectExists('file.pdf');
//Me trying to reduce memory usage; to no avail.
unset($test);
unset($container);
unset($service);
unset($connection);
echo memory_get_usage(true) - $mem;