it is layers of badness all the way down.
like when apis don't do anything much to help you get order of operations right. so you futz around reordering lines of code, doing generate & test, hoping that somehow eventually you'll stop getting errors and failures.
let alone documentation hardy har har.
or help you also know how to clean up right. there should be a helper class which is a mini memory manager for the api that gives you a single free() call and it knows how to clean up all the bits and pieces orderly & properly.