Place a magnet at the edge of a glass. When it is hanging from both sides, stick the paintbrush to the magnet and push the magnet from the outside to clean it against the glass without the bristles touching the bottom.