Renderer cleanup after rerendering (angular)

Hey there,

I’m using the Angular version and created a custom renderer.
My application is updating the schema object regularly, each time triggering a rerendering of the control component.
What I noticed is that even so the component is destroyed (ngOnDestroy is called), mapAdditionalProps is still called for all previously existing components with each rerendering and they are adding up quickly.
Also, the props.id is continuously increasing.

Is this normal behaviour or am I doing something wrong?

I would appreciate some help or pointers where I could look to solve this issue.

Best regards!

Hi @abisz,

Our renderers subscribe on init and unsubscribe on destroy so there should not be any lasting subscriptions for destroyed components.

Good point. I think this is a miss on our side: We create new ids but we never remove them once the component is destroyed. Instead of solving this use case via the factory we should probably also just handle it in the onInit and onDestroy like the subscription.