Ignore:
Timestamp:
Apr 5, 2006, 5:13:50 PM (19 years ago)
Author:
darin
Message:

Reviewed by Maciej.

  • fix memory leak introduced by the previous change
  • kxmlcore/HashTable.h: Specialize NeedsRef so that it correctly returns true when the value in question is a pair where one of the pair needs a ref and the other of the pair does not.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kxmlcore/HashTable.h

    r13703 r13709  
    836836        static const bool value = ValueTraits::needsRef && !ValueStorageTraits::needsRef;
    837837    };
     838    template<typename FirstTraits, typename SecondTraits, typename ValueStorageTraits>
     839    struct NeedsRef<PairBaseHashTraits<FirstTraits, SecondTraits>, ValueStorageTraits> {
     840        typedef typename ValueStorageTraits::FirstTraits FirstStorageTraits;
     841        typedef typename ValueStorageTraits::SecondTraits SecondStorageTraits;
     842        static const bool firstNeedsRef = NeedsRef<FirstTraits, FirstStorageTraits>::value;
     843        static const bool secondNeedsRef = NeedsRef<SecondTraits, SecondStorageTraits>::value;
     844        static const bool value = firstNeedsRef || secondNeedsRef;
     845    };
    838846
    839847    template<bool needsRef, typename ValueTraits> struct RefCounterBase;
Note: See TracChangeset for help on using the changeset viewer.