Skip to content

Commit

Permalink
Use libgobject for unref
Browse files Browse the repository at this point in the history
  • Loading branch information
dnys1 committed Jul 25, 2024
1 parent 3736c00 commit 5a3517f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/native/storage/lib/src/native/linux/linux.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ final class LinuxCommon {
late final gStrHashPointer =
_glibDylib.lookup<NativeFunction<UnsignedInt Function(Pointer<Void>)>>(
'g_str_hash');
late final gObjectUnrefPointer = _glibDylib

late final DynamicLibrary _gobjectDylib = searchDylib('glib', [
'libgobject-2.0.so.0',
if (Platform.isMacOS) '/opt/homebrew/lib/libgobject-2.0.dylib',
]);
late final gObjectUnrefPointer = _gobjectDylib
.lookup<NativeFunction<Void Function(gpointer)>>('g_object_unref');

late final Glib gio = Glib(searchDylib('gio', [
Expand Down

0 comments on commit 5a3517f

Please sign in to comment.