Closed Bug 1477172 Opened 8 years ago Closed 8 years ago

Add a virtual destructor to nsISupports?

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox63 --- affected

People

(Reporter: xidorn, Unassigned)

References

(Blocks 1 open bug)

Details

Clang would complain about no virtual destructor when -Wall. Technically, a virtual class with no virtual destructor has undefined behavior when deleting an object via pointer to interface.
We're not adding this to nsISupports. Concrete subclasses (e.g. mozilla::Runnable) may have virtual destructors if they like. The usual way to get this warning to go away is to make the destructor private.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.