Delegate reference is NIL

I have this protocol definition:

protocol BLECentralProtocol : AnyObject {
    
    func poweredOn(central: BLECentral);
    func scanStarted(central: BLECentral);
    func scanStopped(central: BLECentral, devicesFound: Bool);
    func discovered(central: BLECentral, peripheral: CBPeripheral) -> BLEDevice;
    func connectedTo(central: BLECentral, device: BLEDevice);
}

And a class which implements the protocol like this:

 func discovered(central: BLECentral, peripheral: CBPeripheral) -> BLEDevice {
        print("Discovered");
        let rDevice = BLERadar(peripheral: peripheral);
        print(rDevice.device.delegate, ObjectIdentifier(rDevice.device));
        return rDevice.device;
    }

The BLERadar class creates BLEDevice internally and sets its delegate to BLERadar:

class BLERadar: BLEDeviceProtocol {
    
    public var device: BLEDevice;
    
    init(peripheral: CBPeripheral) {
    
        device = BLEDevice(peripheral: peripheral);
        device.delegate = self;
    }
    
    func rssiRead(device: BLEDevice, value: Double, distance: Double) {
        print("RSSI:",device.peripheral?.name, value, distance)
    }
}

rssiRead() should be called when the BLEDevice (device) is triggered. That's what I want.
Before this can happen, I register all BLEDevices in that way, that I call the aforementioned delegate method "discovered" like this:

        if let device = delegate?.discovered(central: self, peripheral: peripheral) {
            print("didDiscover")
            print(device.delegate,  ObjectIdentifier(device))
            BLEDevices.append(device);
        }

So far so good. The program is running
a) scans the devices and calls "discovered" which in turn creates BLERadar with BLEDevice internally
b) The delegate of BLEDevice is set and not NIL (print out in "discovered")
c) didDiscover code is called and because the protocol method returns the BLEDevice I can work with this on this place
d) rssiRead() is not called because the delegate of BLEDevice is NIL at this moment

Problem: The internal "delegate" reference of BLEDevice is NIL and got lost, but the object references are the same. How can that be?

Bluetooth powered on
Scan started
Discovered
Optional(ios_bluetooth_test.BLERadar) ObjectIdentifier(0x0000000280e9c040)
didDiscover
nil ObjectIdentifier(0x0000000280e9c040)
Discovered
Optional(ios_bluetooth_test.BLERadar) ObjectIdentifier(0x0000000280e9c800)
didDiscover
nil ObjectIdentifier(0x0000000280e9c800)
Discovered
Optional(ios_bluetooth_test.BLERadar) ObjectIdentifier(0x0000000280e9c840)
didDiscover
nil ObjectIdentifier(0x0000000280e9c840)
Discovered
Optional(ios_bluetooth_test.BLERadar) ObjectIdentifier(0x0000000280e89000)
didDiscover
nil ObjectIdentifier(0x0000000280e89000)
Discovered
Optional(ios_bluetooth_test.BLERadar) ObjectIdentifier(0x0000000280e89080)
didDiscover
nil ObjectIdentifier(0x0000000280e89080)
Discovered
Optional(ios_bluetooth_test.BLERadar) ObjectIdentifier(0x0000000280e9c980)
didDiscover
nil ObjectIdentifier(0x0000000280e9c980)
Discovered
Optional(ios_bluetooth_test.BLERadar) ObjectIdentifier(0x0000000280e9ca00)
didDiscover
nil ObjectIdentifier(0x0000000280e9ca00)
Discovered
Optional(ios_bluetooth_test.BLERadar) ObjectIdentifier(0x0000000280e9c9c0)
didDiscover
nil ObjectIdentifier(0x0000000280e9c9c0)
Discovered
Optional(ios_bluetooth_test.BLERadar) ObjectIdentifier(0x0000000280e9ca80)
didDiscover
nil ObjectIdentifier(0x0000000280e9ca80)
Discovered
Optional(ios_bluetooth_test.BLERadar) ObjectIdentifier(0x0000000280e89480)
didDiscover
nil ObjectIdentifier(0x0000000280e89480)
Discovered
Optional(ios_bluetooth_test.BLERadar) ObjectIdentifier(0x0000000280e9c300)
didDiscover
nil ObjectIdentifier(0x0000000280e9c300)
Discovered
Optional(ios_bluetooth_test.BLERadar) ObjectIdentifier(0x0000000280e9c900)
didDiscover
nil ObjectIdentifier(0x0000000280e9c900)
Discovered
Optional(ios_bluetooth_test.BLERadar) ObjectIdentifier(0x0000000280e9cac0)
didDiscover
nil ObjectIdentifier(0x0000000280e9cac0)
Scan stopped. Devices found.
Connect to Optional("<CBPeripheral: 0x282ac5900, identifier = 49B0B14B-0197-B080-0724-6ABFA10E3B20, name = iPhone, mtu = 23, state = connected>")
nil
Connect to Optional("<CBPeripheral: 0x282ac5cc0, identifier = BA30186F-63E4-D0F9-B677-ED3356A7B683, name = iPhone, mtu = 23, state = connected>")
nil
Connect to Optional("<CBPeripheral: 0x282ac5b80, identifier = F33459C6-624E-F5C7-AEC1-27100306023C, name = (null), mtu = 23, state = connected>")
nil
Connect to Optional("<CBPeripheral: 0x282ac5a40, identifier = B4008EE2-D72D-B516-5FDB-23E6C89A026E, name = (null), mtu = 23, state = connected>")
nil
Connect to Optional("<CBPeripheral: 0x282ac5a40, identifier = B4008EE2-D72D-B516-5FDB-23E6C89A026E, name = (null), mtu = 23, state = connected>")
nil
Connect to Optional("<CBPeripheral: 0x282ac5a40, identifier = B4008EE2-D72D-B516-5FDB-23E6C89A026E, name = (null), mtu = 23, state = connected>")
nil
Connect to Optional("<CBPeripheral: 0x282ac12c0, identifier = 591D68C2-13DC-8740-3506-4642B5FA9978, name = Mac, mtu = 23, state = connected>")
nil
Connect to Optional("<CBPeripheral: 0x282ac5720, identifier = BA0CBB9D-B8C1-740A-9C3F-A37DFF00A364, name = Mac, mtu = 23, state = connected>")
nil
Connect to Optional("<CBPeripheral: 0x282ac5720, identifier = BA0CBB9D-B8C1-740A-9C3F-A37DFF00A364, name = Mac, mtu = 23, state = connected>")
nil
Connect to Optional("<CBPeripheral: 0x282ac5720, identifier = BA0CBB9D-B8C1-740A-9C3F-A37DFF00A364, name = Mac, mtu = 23, state = connected>")
nil

BLERadar instance (marked --| above) is being released too early because I suspect BLEDevice delegate is most likely a weak reference to BLERadar.

class BLERadar: BLEDeviceProtocol {
    
    public var device: BLEDevice;
    
    init(peripheral: CBPeripheral) {
    
        device = BLEDevice(peripheral: peripheral);
        device.delegate = self;
        //        |
        //        | - - - This most likely is a weak reference to BLERadar
    }
    ...
}

You need to keep the BLERadar alive as long as the delegate is needed.

Yes, removing the weak keyword resolves the problem. thx