Skip to content

Commit

Permalink
fix the bugs I've introduced when porting the code to older monikers
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsitnik committed May 20, 2024
1 parent cde8100 commit 3a90452
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ internal ArrayRecordDeserializer(ArrayRecord arrayRecord, IDeserializer deserial
Object = _arrayOfT = Array.CreateInstance(_elementType, lengths);
_lengths = lengths;
_indices = new int[lengths.Length];
_canIterate = _arrayOfT.Length > 0;
}

internal override Id Continue()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ internal static ObjectRecordDeserializer Create(ClassRecord classRecord, IDeseri
#if NETCOREAPP
RuntimeHelpers.GetUninitializedObject(type);
#else
// adsitnik: is this the best option we have?
Activator.CreateInstance(type);
Runtime.Serialization.FormatterServices.GetUninitializedObject(type);
#endif

// Invoke any OnDeserializing methods.
Expand Down

0 comments on commit 3a90452

Please sign in to comment.