void () { final AntConfiguration configuration = myConfig; final AntConfigurationListener listener = myListener; myConfig = null; myListener = null; if (configuration != null && listener != null) { configuration.removeAntConfigurationListener(listener); } }