Add a log entry on releaseResources(), to determine if it is being called twice.  (It is, on Yosemite.)
Set outbuf_lock to NULL to avoid a double-free if releaseResources() is called twice.
NULL out a bunch of stuff on initialization for good measure.
Add pointer logging to diagnose memory corruption.