Created pid instance variable so value can be retained after destroy

Fixes #422
What if the inner object doesn't have a pid when this is first called? Then we're caching nil.