|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2017-03-07 06:14 UTC] naoki-kawamukai at cybozu dot co dot jp
[2020-09-14 15:36 UTC] cmb@php.net
-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: cmb
[2020-09-14 15:55 UTC] cmb@php.net
[2020-09-15 10:57 UTC] remi@php.net
[2020-09-15 10:57 UTC] remi@php.net
-Status: Verified
+Status: Closed
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 13:00:01 2025 UTC |
Description: ------------ When I run the test script with latest mailparse(master branch; bc51125921ae1287e3b4705bec1dfd8859d16213 ) and PHP 7.1.2(or PHP7.0.30), memory is not freed. When I run it with debug mode, any memory leak is not reported. But with PHP 5.6.30, memory is freed. Test script: --------------- <?php echo('Before: ' . memory_get_usage() . PHP_EOL); for ($i = 0; $i < 10000; $i++) { if ($i % 1000 == 0) echo(' .. ' . memory_get_usage() . PHP_EOL); new MimeMessage('file', 'tests/testdata/m0001.txt'); } echo('After: ' . memory_get_usage() . PHP_EOL); gc_collect_cycles(); echo('After(gc_collect_cycles): ' . memory_get_usage() . PHP_EOL); Expected result: ---------------- # This is a result of PHP 5.6.30 and mailparse 2.1.6 Before: 225304 .. 225488 .. 225552 .. 225552 .. 225552 .. 225552 .. 225552 .. 225552 .. 225552 .. 225552 .. 225552 After: 225552 After(gc_collect_cycles): 225552 Actual result: -------------- # This is a result of PHP 7.1.2 and latest mailparse Before: 350416 .. 350448 .. 760368 .. 1166512 .. 1834800 .. 1978800 .. 3171400 .. 3315400 .. 3459400 .. 3603400 .. 5844552 After: 5988552 After(gc_collect_cycles): 5988552