free memory of protobuf