Changeset 36425 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Sep 14, 2008, 10:05:17 PM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Eric Seidel.

Add a protected destructor for RefCounted.

It is wrong to call its destructor directly, because (1) this should be taken care of by
deref(), and (2) many classes that use RefCounted have non-virtual destructors.

No change in behavior.

  • wtf/RefCounted.h: (WTF::RefCounted::~RefCounted):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r36419 r36425  
     12008-09-10  Alexey Proskuryakov  <[email protected]>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Add a protected destructor for RefCounted.
     6
     7        It is wrong to call its destructor directly, because (1) this should be taken care of by
     8        deref(), and (2) many classes that use RefCounted have non-virtual destructors.
     9
     10        No change in behavior.
     11
     12        * wtf/RefCounted.h: (WTF::RefCounted::~RefCounted):
     13
    1142008-09-14  Gavin Barraclough  <[email protected]>
    215
  • trunk/JavaScriptCore/wtf/RefCounted.h

    r34544 r36425  
    6767    }
    6868
     69protected:
     70    ~RefCounted() {}
     71
    6972private:
    7073    int m_refCount;
Note: See TracChangeset for help on using the changeset viewer.