Release some dangling objects in userevents. (#837)

1 file changed