Deleting buffer in c++ binding


I have two kernel, and I set different buffers for each one of them, and I want to delete the buffers of the first kernel and free the memory before creating the buffers of the second kernel, how I can delete them ( I know how to do that in c but how to do it in c++).