Skip to content

Commit

Permalink
fix(skia): add finalizer to sk_data_from_stream (#960)
Browse files Browse the repository at this point in the history
  • Loading branch information
zbaylin committed Jul 17, 2020
1 parent dafd904 commit 7e72660
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/reason-skia/src/Skia.re
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 649,11 @@ module Data = {
maybeData;
};

let makeFromStream = SkiaWrapped.Data.makeFromStream;
let makeFromStream = (stream, length) => {
let data = SkiaWrapped.Data.makeFromStream(stream, length);
Gc.finalise(SkiaWrapped.Data.delete, data);
data;
};
};

module Typeface = {
Expand Down

0 comments on commit 7e72660

Please sign in to comment.