I agree it's pretty ugly, especially in the OO API. However that's the behavior of the procedural API and code might rely on this destroying the object/resource,