Recycle objects with minimal boilerplate with an object pool