It depends partly on the circumstances on which you leave the band. If you get too precious about your basslines that's likely to be "burning your bridges" and could come back to bite you if the band needs a fill in bassist for a paying gig in future or you later want to join a group which includes one of your former bandmates. Threaten them with nasty consequences for using your lines and you can be sure you're replacement will come up with original lines that sound much better when you hear them on the radio one day
Also, it's likely that your basslines were created along with the rest of the songs; how much of your work rests on what you heard everybody else playing? Songs you wrote might be a bit different; are you talking about playing for fun or something your livlihood rests on?
As far as teaching your replacement how to play them, I'd generally be willing to put in some time but not a lot. If the new bassist needs lessons to learn the lines, he'd better pay you like a teacher!
Wulf