getndazn / kopytko-framework

A modern Roku's Brightscript framework based on JS world's solutions
MIT License
19 stars 6 forks source link

fix: event bus storing last payload of each event #45

Closed RadoslawZambrowski closed 1 year ago

RadoslawZambrowski commented 1 year ago

What did you implement:

Fixed memory leaks from the EventBus node which was storing the last payload of each event

How did you implement it:

Changed event-specific fields in the EventBus node to boolean instead of AA. Added a dedicated $$payload field to the EventBus node which stores the payload of the currently being triggered event. The field is cleared after dispatching an event.

How can we verify it:

Basically, no regression when it comes to the app behavior.

Additionally, it can be verified by ECP (query/sgnodes/roots) if some nodes were leaking before changes and are not leaking anymore with these changes.

Todos:

Is this ready for review?: YES Is it a breaking change?: NO