Detect game quitting

Hello mates, as tittle suggest, how can i dectect when my game is quitting? I have try out the Quit blueprint and quit in C++, but it is not what i want, because i have made a custom struct that contain some pointers that need to be set to null before game completely quitting, or those pointers will crash my game. Thank you in advance.
CKong.

Hi CKong,

Check this post Event on Close - Programming & Scripting - Epic Developer Community Forums

Best regards,