go to bug id or search bugs for
Calling exit from a user error handler causes an object to be destructed, even if
the object was never constructed.
The Tree's destructor should never be called.
Add a Patch
Add a Pull Request
There doesn't even need to be an error handler involved, see
<https://3v4l.org/cR3nF>. Looking at the opcodes hints at
what's going on behind the scenes: first NEW is executed, and only
after that the arguments for the constructor are evaluated, which,
in this case, cause the script to terminate, without actually
calling the constructor. On shutdown, however, the newly created
object gets properly destroyed by calling its destructor.
In my opinion, this is a bug.