"Loving" is an adjective that modifies the noun "memory". As a noun, "memory" can be described by any adjective. You can have
"a happy memory"
"a bitter memory"
"a loving memory".
Present participles, like "loving", can *always* be used as adjectives. Here are some more examples showing participles being used in this way:
"That was a fascinating movie"
"He is a stimulating teacher"
"That was a boring lecture"
"English is a vexing language"