Commit 3e963e68 authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[master] Fixed memory leak in IfaceMgr singleton.

parent f0a88101
......@@ -36,26 +36,10 @@ using namespace isc::util::io::internal;
namespace isc {
namespace dhcp {
/// IfaceMgr is a singleton implementation
IfaceMgr* IfaceMgr::instance_ = 0;
IfaceMgr::instanceCreate() {
if (instance_) {
// no need to do anything. Instance is already created.
// Who called it again anyway? Uh oh. Had to be us, as
// this is private method.
instance_ = new IfaceMgr();
IfaceMgr::instance() {
if (instance_ == 0) {
return (*instance_);
static IfaceMgr iface_mgr;
return (iface_mgr);
IfaceMgr::Iface::Iface(const std::string& name, int ifindex)
......@@ -537,9 +537,6 @@ protected:
/// List of available interfaces
IfaceCollection ifaces_;
/// a pointer to a sole instance of this class (a singleton)
static IfaceMgr * instance_;
// TODO: Also keep this interface on Iface once interface detection
// is implemented. We may need it e.g. to close all sockets on
// specific interface
......@@ -580,10 +577,6 @@ protected:
SessionCallback session_callback_;
/// @brief Creates a single instance of this class (a singleton implementation)
static void
/// @brief Joins IPv6 multicast group on a socket.
/// Socket must be created and bound to an address. Note that this
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment