Resource operations are usually performed in the following sequence:
Allocate a resource handle with the FairCom DB API call, ctdbAllocResource().
Perform the desired resource operation such as adding, updating, deleting or reading resources.
Once a resource handle is no longer required, call ctdbFreeResource() to free any resource locks and release the memory allocated for the resource handle.