fix potential out of memory issue in MemoryPackagePart

byte array should be avoid