Long PsychoPy experiment taking up application memory

Hi everyone, I created an experiment that involves subjects watching 300 videos and simultaneously and retroactively rating them for valence + arousal. Sometimes the task runs completely fine, and other times it crashed (I believe due to a memory error, but it doesn’t log an error at times). One message that sometimes pops up is “Your system has run out of application memory” , and PsychoPy is taking up a ton of storage (close to 50GB). Is there a way to prevent videos from staying in application memory, or is there another way to prevent this type of issue?

OS (e.g. Win10): Mac OS Monterey
PsychoPy version (e.g. 1.84.x): 2021.2.3
Standard Standalone? (y/n) If not then what?: Y