^ If you're trying to remember a soliloquy in a play for example, you're probably not going to memorize the whole thing straight through. You'll divide it into parts and then string the parts together, since all most solos are like a soliloquy in that they have phrases and sentence-like structures. I think the same approach applies to a guitar solo. But I've never really had trouble memorizing solos since I 1) know the songs so well through excessive listening and 2) have the tabs sitting in front of me.
If you're talking about a complicated Petrucci-esque solo or unison, say the unison at the end of This Dying Soul, then learn the picking pattern that gets repeated throughout the part. That's really all it is is a few different picking patterns moved around about the neck in compliance with the scale/key used.