It's very difficult to say how this could be fixed, especially if it's happening only on long flights, the memory leak could be anywhere, I'm afraid we simply must accept the fact that video drivers might have bugs, FSX surely have unknown bugs, or the airplane and all the sceneries and addons together might just be too much for it.