Fix memory leak in EGamma algo