util: plug Regex memory leak
Previously, RegexMatcher::m_backrefManager and RegexBackrefManager::m_backrefs
own each other via shared_ptrs, causing a memory leak.
RegexBackrefManager::m_backrefs is now changed to weak_ptr.
refs #3673
Change-Id: I882a83ee1f29754721d9b3b9997b3bbc465df989
diff --git a/src/util/regex/regex-top-matcher.hpp b/src/util/regex/regex-top-matcher.hpp
index 465f8f0..777a4de 100644
--- a/src/util/regex/regex-top-matcher.hpp
+++ b/src/util/regex/regex-top-matcher.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -64,7 +64,7 @@
static std::string
convertSpecialChar(const std::string& str);
-private:
+NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
const std::string m_expand;
shared_ptr<RegexPatternListMatcher> m_primaryMatcher;
shared_ptr<RegexPatternListMatcher> m_secondaryMatcher;