Fixing memory leaks

Looks like there is a memory leak in the ByteBuf and Slab