Closed
Bug 1142695
Opened 10 years ago
Closed 7 years ago
Consider making Mutex, OffTheBooksMutex, BlockingResourceBase's dtors virtual
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: erahm, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: [MemShrink:P3][CID 1286381])
Coverity indicated a potential leak if an upcast pointer from a Mutex is deleted, Mutex's dtor would not be hit, ie something like:
> void killer(OffTheBooksMutex* b) { delete b; }
> Mutex* a = new Mutex("test");
> killer(a);
While it doesn't appear that this is currently happening (the instance Coverity flagged looks like a bug in Coverity), it certainly *could*.
Comment 1•10 years ago
|
||
Since these classes don't have virtual methods currently, I really don't think we should pay the vtable penalty for this.
![]() |
||
Updated•10 years ago
|
Whiteboard: [MemShrink][CID 1286381] → [MemShrink:P3][CID 1286381]
Updated•7 years ago
|
Blocks: coverity-analysis
![]() |
||
Comment 2•7 years ago
|
||
(In reply to Benjamin Smedberg from comment #1)
> Since these classes don't have virtual methods currently, I really don't
> think we should pay the vtable penalty for this.
Yup.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•