The code used to use hasBuffer, which was never set to true, so buffer objects were always leaked instead.