Menu

#150 Memory leak

closed
None
2018-12-15
2015-08-17
higimo
No

Sorry for bad english.

Using file_get_html in a loop (for, about 50 iteration) and each time unset($html), i get php error:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 75 bytes) in /simple_html_dom.php on line 1177

Discussion

  • LogMANOriginal

    LogMANOriginal - 2018-12-15
    • status: open --> closed
    • assigned_to: LogMANOriginal
     
  • LogMANOriginal

    LogMANOriginal - 2018-12-15

    The amount of memory PHP can access is limited by your local configuration ('php.ini'). In the repository you'll find a unit test for memory allocation with 50 iterations, where the memory size stays stable (to be fair, it triggers the garbage collector manually to make this possible).

    As far as I can tell, this is fixed in the latest version, so I'm closing this issue. Please don't hesitate to open a new issue if you still experience issues.

     

Log in to post a comment.