Re: Memory leak in eval()'d code
| From: | Benjamin Morel | Date: | Fri, 28 Jun 2019 22:37:06 +0000 |
| Subject: | Re: Memory leak in eval()'d code | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-106103@lists.php.net to get a copy of this message | ||
>
> That's not a "leak". You create new objects (in this case, classes),
> they take memory.
Why do they not "leak" memory without eval() then? Replace with `$object =
new class {};` and memory usage stays flat.
There has do be some kind of garbage collection for these anonymous classes.
Ben