Ticket #11352: helgrind.patch

File helgrind.patch, 708 bytes (added by jpoet, 11 years ago)
  • mythtv/libs/libmythbase/referencecounter.cpp

    diff --git a/mythtv/libs/libmythbase/referencecounter.cpp b/mythtv/libs/libmythbase/referencecounter.cpp
    index 09adc62..17b409e 100644
    a b  
    11// -*- Mode: c++ -*-
    22
     3#include <valgrind/helgrind.h>
    34#include <QString>
    45
    56#include "referencecounter.h"
    int ReferenceCounter::DecrRef(void) 
    155156#else
    156157    if (0 == val)
    157158    {
     159        ANNOTATE_HAPPENS_AFTER(&m_referenceCount);
     160        ANNOTATE_HAPPENS_BEFORE_FORGET_ALL(&m_referenceCount);
    158161        delete this;
    159162        return val;
    160163    }
     164    else
     165        ANNOTATE_HAPPENS_BEFORE(&m_referenceCount);
    161166#endif
    162167
    163168    return val;