From 60dd37a2aa29d672b43cbb14b5ca62382ccb073a Mon Sep 17 00:00:00 2001 From: bglgwyng Date: Wed, 4 Sep 2024 19:40:13 +0900 Subject: [PATCH] Delay disposing image buffer. --- example/src/App.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/example/src/App.tsx b/example/src/App.tsx index a629ae5..2c9f789 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -63,8 +63,9 @@ export default function App() { }); const data = Skia.Data.fromBytes(result); - updatePreviewImageFromData(data, TARGET_FORMAT); - data.dispose(); + updatePreviewImageFromData(data, TARGET_FORMAT).then(() => + data.dispose(), + ); const end = performance.now(); console.log(