Fix pntential memmory leak use static variable for instance.

Authored by mreeves on Nov 28 2018, 4:48 AM.