Fixed memory leak of ByteVector

See #223.