Fixed memory issues in Box SDK.

https://www.pivotaltracker.com/story/show/46374023