I tend to find I lose melodies or occasionally rhythms. Chords are the last thing to go if I havn't played something for an age.
When writing M Ted's advice is relevent. Don't just stick with the guitar. Sometimes sining out loud and forcing the backing to work for the melody rather than vice versa can produce good results.
If you are afraid of losing individual parts in a song and don't have a convenient mutitrack studio to hand, I find the best thing is to work out each on your instrument of choice. E.G. The sung melody line on your guitar. In this way you reinforce the memory using a separate channel in your mind and are far less likely to lose both.
My £0 0s 2d for what it's worth...