<?php
function test() {
echo memory_get_usage() . "\n";
$memcache_obj = new Memcache();
$memcache_obj->addServer('memcached.local' , 11211);
echo memory_get_usage() . "\n";
// None of this seems to make a difference.
//$memcache_obj->close();
//unset($memcache_obj);
}
while (true) {
test();
sleep(1);
}
There appears to be a memory leak:
Sample Code:
Actual Output:
Expected Output: