From 875d556ab295aa875ad17bd9ffcc82694c58db7a Mon Sep 17 00:00:00 2001 From: Rod Kay Date: Mon, 16 Sep 2024 22:54:14 +1000 Subject: [PATCH] lace.make_subject.destroy: Destroy the 'Sender' if it has been enabled. --- 1-base/lace/source/events/mixin/lace-make_subject.adb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/1-base/lace/source/events/mixin/lace-make_subject.adb b/1-base/lace/source/events/mixin/lace-make_subject.adb index 8387413..2105a41 100644 --- a/1-base/lace/source/events/mixin/lace-make_subject.adb +++ b/1-base/lace/source/events/mixin/lace-make_subject.adb @@ -15,7 +15,12 @@ is begin if Self.Emitter /= null then - Self.Emitter.destruct; + Self.Emitter.destroy; + end if; + + if Self.Sender /= null + then + Self.Sender.destroy; end if; Self.safe_Observers.destruct;