Skip to content

Commit 60917c1

Browse files
committed
Use unset() to automatically call __destruct() when testing for a memory leak
1 parent d13c431 commit 60917c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/PHPCurlClass/PHPCurlClassTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3026,7 +3026,7 @@ public function testMemoryLeak()
30263026
}
30273027
echo '{"before":' . memory_get_usage() . ',';
30283028
$curl = new Curl();
3029-
$curl->close();
3029+
unset($curl);
30303030
echo '"after":' . memory_get_usage() . '}';
30313031
sleep(1);
30323032
}

0 commit comments

Comments
 (0)