Wiping a person's mind seems cruel and unusual. You're literally stealing their personhood and identity in a way.
That said, if I myself were given the choice between death and having my memory erased, I'm not sure which I would pick - I could seriously see myself choosing to have my mind wiped.
There are some things I would want to know in making up my mind. For one thing, as Snazzy alludes to, I would want to know how likely serious criminals are to commit future crimes after having their minds wiped. I imagine this would vary on a case-to-case basis. For example, I could see someone involved in organized crime, without any serious mental predispositions for violence being completely reformed by this. But I doubt it would resolve any issues for a sociopath, someone with sadistic personality disorder, or people with other serious antisocial predispositions.
Maybe we should give people the option. I have toyed with the idea of giving such serious offenders the choice between life in prison and the death penalty. The problem with such self-selection, of course, is that I would expect people who seriously regret their crimes to be more likely to go for the death penalty, and people with serious criminal insanity like sociopathy to go for life in prison because of their desire for self-preservation.