fix the memory when releasing resource