fix notification, document memory management