Added free method to Object and added freeing of the buffer of String to its destructor.