[filebrowser] manage task's resource in onClose function now