internal void MaybeDisposeBuffer() { // Do not dispose while deserializing! // For example DecompileDefaultProperties or DecompileScript, may dispose the buffer in certain situations! if (_Buffer == null || (DeserializationState & ObjectState.Deserializing) != 0) { return; } _Buffer.DisposeBuffer(); _Buffer = null; }
private void InitBuffer() { var buff = new byte[ExportTable.SerialSize]; Package.Stream.Seek(ExportTable.SerialOffset, SeekOrigin.Begin); Package.Stream.Read(buff, 0, ExportTable.SerialSize); if (Package.Stream.BigEndianCode) { Array.Reverse(buff); } _Buffer = new UObjectStream(Package.Stream, buff); }
private void InitBuffer() { //Console.WriteLine( "Init buffer for {0}", (string)this ); var buff = new byte[ExportTable.SerialSize]; Package.Stream.Seek(ExportTable.SerialOffset, SeekOrigin.Begin); Package.Stream.Read(buff, 0, ExportTable.SerialSize); if (Package.Stream.BigEndianCode) { Array.Reverse(buff); } _Buffer = new UObjectStream(Package.Stream, buff); }
internal void MaybeDisposeBuffer() { //Console.WriteLine( "Disposing buffer for {0}", (string)this ); // Do not dispose while deserializing! // For example DecompileDefaultProperties or DecompileScript, may dispose the buffer in certain situations! if (_Buffer == null || (DeserializationState & ObjectState.Deserializing) != 0) { return; } _Buffer.DisposeBuffer(); _Buffer = null; //Console.WriteLine( "Disposed" ); }
internal void MaybeDisposeBuffer() { //Console.WriteLine( "Disposing buffer for {0}", (string)this ); // Do not dispose while deserializing! // For example DecompileDefaultProperties or DecompileScript, may dispose the buffer in certain situations! if( _Buffer == null || (DeserializationState & ObjectState.Deserializing) != 0 ) return; _Buffer.DisposeBuffer(); _Buffer = null; //Console.WriteLine( "Disposed" ); }
private void InitBuffer() { //Console.WriteLine( "Init buffer for {0}", (string)this ); var buff = new byte[ExportTable.SerialSize]; Package.Stream.Seek( ExportTable.SerialOffset, SeekOrigin.Begin ); Package.Stream.Read( buff, 0, ExportTable.SerialSize ); if( Package.Stream.BigEndianCode ) { Array.Reverse( buff ); } _Buffer = new UObjectStream( Package.Stream, buff ); }