in reply to break out of enless loop does not release memory

Try undef @eventlist. In most cases, the process will still hold onto the memory, but this may at least let you reuse it for other variables within this program.