what happens with memory when I throw an exception?
<p>This is the code (just a simplification of a real problem):</p>

<pre><code>&lt;?php
echo memory_get_usage() . "\n";
function f() {
    throw new Exception();
}
function foo() {
    try {
        f();
    } catch (Exception $e) {
    }
}
foo();
echo memory_get_usage() . "\n";
</code></pre>

<p>This is the output (PHP 5.3):</p>

<pre><code>630680
630848
</code></pre>

<p>What happened with memory (168 bytes lost)? The exception object is not destroyed? Please, help! Thanks</p>
