Open Bug 429422 Opened 17 years ago Updated 2 years ago

nsEvent should have a virtual destructor

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect

Tracking

()

People

(Reporter: bent.mozilla, Unassigned)

Details

Bug 429233 illustrated why we really need virtual destructors for our events. Without them we're failing to clean up any of the members of derived events every time we delete an nsEvent*.

We could, of course, cast everything to the appropriate type and use some static analysis to enforce it, but then we'd just be reinventing virtual destructors :)
Flags: wanted-next+
nsEvents in DOM are hopefully going away and then their only use case will be
stack objects somewhere in widgets/ code.
With the appropriate compile time static analysis flags set for that then I hope!
NS_STACK_CLASS at your disposal!
Component: Event Handling → User events and focus handling
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.