Please add a unit test for testing the functionality provided by API and the expected exceptions for example when manipulating a buffer after release.