Did Ash get rid of Greninja?

Did Ash get rid of Greninja? Despite the two of them having an exceptionally strong friendship, Ash ultimately released Greninja because Greninja’s help was needed in destroying the roots of a remaining Giant Rock.

Despite the two of them having an exceptionally strong friendship, Ash ultimately released Greninja because Greninja’s help was needed in destroying the roots of a remaining Giant Rock.