How to detect PIE exit?

How to detect PIE exit?

I want to do something when PIE exits,

such as the release of memory

I solved this problem

I have customized GameInstance

use GameInstance Shutdown event

StandAlone Game exit will trigger gameinstance shut down too.