delete useless resources