Currently, the Event Engine uses a hand-rolled Reference Counting solution to manage the Lifetime of TLKEvent instances.
That works pretty well, but requires additional code that is no longer required.
By using ILKEventHolder (defined as ILKObjectHolder<TLKEvent>) as the item type for the Event Lists (queues/stacks), we get the defacto Reference Counting advantages of Interfaces to manage the Lifetime of each Event.
Furthermore, should the implementing developer wish to retain an internal reference to an existing Event (not something that's recommended, but may be useful for corner-cases) they will be able to do so simply by creating their own ILKEventHolder instance and dispatching the Event to the Queue, Stack, or Scheduler using the Holder instead of the Event itself.
Currently, the Event Engine uses a hand-rolled Reference Counting solution to manage the Lifetime of
TLKEvent
instances.That works pretty well, but requires additional code that is no longer required.
By using
ILKEventHolder
(defined asILKObjectHolder<TLKEvent>
) as the item type for the Event Lists (queues/stacks), we get the defacto Reference Counting advantages of Interfaces to manage the Lifetime of each Event.Furthermore, should the implementing developer wish to retain an internal reference to an existing Event (not something that's recommended, but may be useful for corner-cases) they will be able to do so simply by creating their own
ILKEventHolder
instance and dispatching the Event to the Queue, Stack, or Scheduler using the Holder instead of the Event itself.