(#2337) - fix replication event listener memory leak