Skip to content

Commit

Permalink
Dispose
Browse files Browse the repository at this point in the history
  • Loading branch information
artemiusgreat committed Mar 18, 2024
1 parent 48debf4 commit 049aaca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Canvas.Core/Canvas.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>3.0.4</Version>
<Version>3.0.5</Version>
<Description>Internal package used in Canvas.Views.Web</Description>
<Authors>artemiusgreat</Authors>
<Copyright>indemos.com</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion Canvas.Views.Web/Canvas.Views.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PropertyGroup>
<IsPackable>true</IsPackable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>3.0.4</Version>
<Version>3.0.5</Version>
<PackageTags>finance chart opengl canvas trading gdi stock direct2d</PackageTags>
<Authors>artemiusgreat</Authors>
<Copyright>indemos.com</Copyright>
Expand Down
9 changes: 4 additions & 5 deletions Canvas.Views.Web/Views/BaseView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ public class BaseView : ComponentBase, IView
/// <param name="message"></param>
/// <param name="source"></param>
/// <returns></returns>
public virtual Task Update(DomainModel message, string source = null)
public virtual async Task Update(DomainModel message, string source = null)
{
return Schedule(async () =>
await Schedule(() =>
{
if (Engine?.Instance is null)
{
Expand All @@ -65,9 +65,9 @@ public virtual Task Update(DomainModel message, string source = null)
Engine.Clear();
Composer.GetItems(Engine, Composer.Domain);
Route = "data:image/webp;base64," + Convert.ToBase64String(Engine.Encode(SKEncodedImageFormat.Webp, 100));

await InvokeAsync(StateHasChanged);
});

await InvokeAsync(StateHasChanged);
}

/// <summary>
Expand All @@ -92,7 +92,6 @@ public virtual void Dispose()
OnMouseMove = o => { };
OnMouseLeave = o => { };

Engine?.Dispose();
ScriptService?.Dispose();
ScheduleService?.Dispose();
}
Expand Down

0 comments on commit 049aaca

Please sign in to comment.