But this is before the statement that actually calls ProcessEvent() to send the event to the plugins. The temporary value has been freed by that point.
Also, using the address of a local variable is OK in this case since the event handling is synchronous: ProcessEvent() does not return till all receivers have processed the event.
In that case, a temporary used in the first function call has gone out of scope before ProcessEvent() is called. But using a local variable instead ensures that the value stays in scope through the end of the function (or block) containing both statements.
which means that print() was invoked with 'e' pointing to an invalid pointer.
The reason that it does not crash is just because that the memory was not reused again - pure luck