From 0354a7c21cae08cda07864dcb70a76d37fe43375 Mon Sep 17 00:00:00 2001 From: Estevan Castilho Date: Thu, 8 Oct 2026 00:54:55 +0000 Subject: Log whenever managed objects are garbage collected --- lib/protocols/Handle.mli | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/protocols/Handle.mli') diff --git a/lib/protocols/Handle.mli b/lib/protocols/Handle.mli index a354257..f413aac 100644 --- a/lib/protocols/Handle.mli +++ b/lib/protocols/Handle.mli @@ -5,6 +5,7 @@ type protocol = .. class type obj = object method reference : bool method release : unit + method is_managed : bool method hash : Concepts.Hash.hash method to_string : string method protocols : protocol list -- cgit v1.2.3 From 290be60cf34ef2550a8cb9aa447c232445cd1476 Mon Sep 17 00:00:00 2001 From: Estevan Castilho Date: Thu, 8 Oct 2026 02:13:00 +0000 Subject: Autorelease pools --- lib/protocols/Handle.mli | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/protocols/Handle.mli') diff --git a/lib/protocols/Handle.mli b/lib/protocols/Handle.mli index f413aac..7b0a996 100644 --- a/lib/protocols/Handle.mli +++ b/lib/protocols/Handle.mli @@ -22,3 +22,4 @@ val hash : t -> Concepts.Hash.hash val protocols : t -> protocol list val to_string : t -> string val require : (t -> 'a interface option) -> t -> ('a interface, Concepts.Condition.condition) result +val with_autorelease : (unit -> 'a) -> 'a -- cgit v1.2.3 From bd152dc4311a117f125916e1f75cb5ce02752630 Mon Sep 17 00:00:00 2001 From: Estevan Castilho Date: Sat, 10 Oct 2026 00:32:41 +0000 Subject: `without_autorelease`, `keep` --- lib/protocols/Handle.mli | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/protocols/Handle.mli') diff --git a/lib/protocols/Handle.mli b/lib/protocols/Handle.mli index 7b0a996..f1a9609 100644 --- a/lib/protocols/Handle.mli +++ b/lib/protocols/Handle.mli @@ -23,3 +23,5 @@ val protocols : t -> protocol list val to_string : t -> string val require : (t -> 'a interface option) -> t -> ('a interface, Concepts.Condition.condition) result val with_autorelease : (unit -> 'a) -> 'a +val without_autorelease : (unit -> 'a) -> 'a +val keep : t -> unit -- cgit v1.2.3 From 9be5137143177492e82dc25e6dbd3b82e3aa7e5d Mon Sep 17 00:00:00 2001 From: Estevan Castilho Date: Sat, 10 Oct 2026 01:09:17 +0000 Subject: Make namespaces take ownership of the handles it is given --- lib/protocols/Handle.mli | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/protocols/Handle.mli') diff --git a/lib/protocols/Handle.mli b/lib/protocols/Handle.mli index f1a9609..47cee38 100644 --- a/lib/protocols/Handle.mli +++ b/lib/protocols/Handle.mli @@ -16,6 +16,7 @@ val into : t -> (protocol -> 'a option) -> 'a interface option val from : 'a interface -> t val invoke : 'a interface -> ('a -> 'b) -> 'b val copy : t -> t option +val move : t -> t val equal : t -> t -> bool val release : t -> unit val hash : t -> Concepts.Hash.hash @@ -24,4 +25,5 @@ val to_string : t -> string val require : (t -> 'a interface option) -> t -> ('a interface, Concepts.Condition.condition) result val with_autorelease : (unit -> 'a) -> 'a val without_autorelease : (unit -> 'a) -> 'a +val autorelease : t -> unit val keep : t -> unit -- cgit v1.2.3 From 6201bbc6e7171f037467bbfc2d0a6da084fb516c Mon Sep 17 00:00:00 2001 From: Estevan Castilho Date: Sat, 10 Oct 2026 02:14:55 +0000 Subject: Make the autorelease pool opt-in --- lib/protocols/Handle.mli | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/protocols/Handle.mli') diff --git a/lib/protocols/Handle.mli b/lib/protocols/Handle.mli index 47cee38..1c3b9d4 100644 --- a/lib/protocols/Handle.mli +++ b/lib/protocols/Handle.mli @@ -24,6 +24,5 @@ val protocols : t -> protocol list val to_string : t -> string val require : (t -> 'a interface option) -> t -> ('a interface, Concepts.Condition.condition) result val with_autorelease : (unit -> 'a) -> 'a -val without_autorelease : (unit -> 'a) -> 'a -val autorelease : t -> unit -val keep : t -> unit +val autorelease : t -> t +val keep : t -> t -- cgit v1.2.3