Merge pull request #676 from billhollings/master

 Reduce memory leaks when autorelease pools are not available.