The current implementation leaks a helper object that is never disposed of. We should dispose of it.
public static async Task<Blob> CreateAsync(IJSRuntime jSRuntime, IList<BlobPart>? blobParts = null, BlobPropertyBag? options = null)
{
IJSObjectReference helper = await jSRuntime.GetHelperAsync();
object?[]? jsBlobParts = blobParts?.Select<BlobPart, object?>(blobPart => blobPart.Part switch
{
byte[] part => part,
Blob part => part.JSReference,
_ => blobPart.Part
})
.ToArray();
IJSObjectReference jSInstance = await helper.InvokeAsync<IJSObjectReference>("constructBlob", jsBlobParts, options);
return new Blob(jSRuntime, jSInstance, new() { DisposesJSReference = true });
}