to replace native closeNotifier with little memory cost