Set the buffer allocator to use earlier.
code cleanup.
Release allocated buffers.