Skip to content

Commit

Permalink
ifdef refcount debug access to fix build failure when refcounting is …
Browse files Browse the repository at this point in the history
…not available
  • Loading branch information
Soeren Sonnenburg committed Jul 26, 2013
1 parent 72865ad commit d1be1ca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/shogun/structure/FactorGraph.cpp
Expand Up @@ -43,10 +43,12 @@ CFactorGraph::~CFactorGraph()
if (m_factors != NULL)
SG_DEBUG("CFactorGraph::~CFactorGraph(): m_factors->ref_count() = %d.\n", m_factors->ref_count());

#ifdef USE_REFERENCE_COUNTING
if (m_datasources != NULL)
SG_DEBUG("CFactorGraph::~CFactorGraph(): m_datasources->ref_count() = %d.\n", m_datasources->ref_count());

SG_DEBUG("CFactorGraph::~CFactorGraph(): this->ref_count() = %d.\n", this->ref_count());
#endif
}

void CFactorGraph::register_parameters()
Expand All @@ -60,8 +62,10 @@ void CFactorGraph::register_parameters()
m_factors = new CDynamicObjectArray();
m_datasources = new CDynamicObjectArray();

#ifdef USE_REFERENCE_COUNTING
if (m_factors != NULL)
SG_DEBUG("CFactorGraph::register_parameters(): m_factors->ref_count() = %d.\n", m_factors->ref_count());
#endif

SG_REF(m_factors);
SG_REF(m_datasources);
Expand Down

0 comments on commit d1be1ca

Please sign in to comment.