debug mode and realm retain