Fixed getGeneratedKeys() memory leak