Fix some bad refcount code and squash some potential leakiness on Mac; by Cinder Roxley
Fix some bad refcount code and squash some potential leakiness on Mac; by Cinder Roxley

gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm,gabeharms/firestorm