You can just assign a new cl::Buffer with different size to your global one like so:
mycl_Buf = cl::Buffer(...);
Assign operator will take care of the rest.
1 of 1 people found this helpful
Yes, it all reference counts. That's the biggest benefit over using the C API, I think. You can pass objects around and the retain/release behaviour is automatic. Never call the destructors directly unless you really know what you are doing because it may end up being called again on object destruction.