If the call to fdb_database_create_transaction()
fails (e.g. returns error) should I call fdb_transaction_destroy()
or not?
You don’t need to call destroy. But this is actually quite a good question. I guess I would prefer if fdb_transaction_destroy
would accept a null pointer and fdb_database_create_transaction
would initialize that first to null and then try to create the transaction. With these two changes both would work - calling destroy or not.
This would also be pretty easy to implement.