Won't the destructor for buffer be called upon exiting the block?