windows clear function impl