Clearing All Events Attached To A Component

Hello,

I am struggling with the following problem:

I extend CModel, add some custom events and attach multiple event handlers.

When I clone the CMode instance I want to clear all attached event handlers in the new copy, but there doesn’t seem to be an easy way to detach all event handlers.

I mean…I can go and iterate all events by using getEventHandlers() and calling remove() on each event, but this is a bad solution.

Am I missing something?