Hey Welcome to TalkBass! Don't be surprised if a mod moves this to (perhaps) the misc category or some other heading. Not a big deals but it just doesn't belong in the "basses" section. You'll get used to what goes where as you (hopefully) stick around.
As for the topic, I get it. I have hundreds of bass lines swimming around in my head. I can probably play all of them pretty well with the band or along with the original track. I bet I would stumble a little in a game of "Pop Quiz the Bass Player" where someone simply called out songs and I had to just play the line by myself with no band or track.
That being said, one of the ways I "practice" is to listen to my songs over and over again. I am able to listen t work sometimes. So I make playlists of what I am currently learning and they are constantly playing even if I am busy. That way the song is pretty well imprinted into my tiny little brain. All memories have to fight for space in that little sucker. So the ones I hear over and over again get the best chance of a permanent spot.