Always check the pockets before washing. Turn them inside out, if possible. This should be part of your routine.
I learned this the hard way, when I forgot still wrapped sugar-free chewing gum in my jeans pocket and during washing it unwrapped and got kinda chewed into the fabric of the pocket. I never got it completely out.