|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-09-14 15:35 UTC] cmb@php.net
-Status: Open
+Status: Duplicate
-Assigned To:
+Assigned To: cmb
[2020-09-14 15:35 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 21:00:01 2025 UTC |
Description: ------------ When looping over and parsing multiple emails, there appears to be a memory leak. Memory is not being freed when calling mailparse_msg_free after parsing. In the test script you will notice the memory usage steadily climbing. Test script: --------------- $i = 0; while ($i++ < 100000) { $mail = mailparse_msg_create(); mailparse_msg_parse($mail, file_get_contents("download.eml")); $struct = mailparse_msg_get_structure($mail); mailparse_msg_free($mail); echo "Memory Consumption is "; echo round(memory_get_usage() / 1048576, 2) . '' . ' MB' . PHP_EOL; } Expected result: ---------------- Memory to be freed Actual result: -------------- Memory usage continues to climb