summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-06-06 20:10:23 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-06-06 20:10:23 +0100
commit6613fc311fc690110bf0a411ceb593f081e0ab49 (patch)
tree580232325d180b27d02120a57b36bf316b60dbeb
parentAdd missing virtual destructor to OptionsSource (diff)
downloadproject2-6613fc311fc690110bf0a411ceb593f081e0ab49.tar.bz2
project2-6613fc311fc690110bf0a411ceb593f081e0ab49.tar.xz
project2-6613fc311fc690110bf0a411ceb593f081e0ab49.zip
Tweaks while tracking down Column leak
-rw-r--r--project2/common/columns.h4
-rw-r--r--project2/common/rowSet.cpp8
-rw-r--r--project2/common/rowSet.h4
-rw-r--r--project2/common/sourceObject.cpp4
-rw-r--r--project2/common/sourceObject.h2
-rw-r--r--project2/common/variables.cpp4
-rw-r--r--project2/common/variables.h2
7 files changed, 7 insertions, 21 deletions
diff --git a/project2/common/columns.h b/project2/common/columns.h
index bc62447..d3e2c97 100644
--- a/project2/common/columns.h
+++ b/project2/common/columns.h
@@ -10,6 +10,7 @@ class Column : public IntrusivePtrBase {
public:
Column(unsigned int idx, ScriptNodePtr p);
Column(unsigned int i, const Glib::ustring & n, const Variable & v = Variable(Null()));
+ virtual ~Column() = default;
static Column * make(unsigned int idx, ScriptNodePtr p);
@@ -21,7 +22,8 @@ class Column : public IntrusivePtrBase {
struct byColIdx {};
struct byColName {};
-typedef boost::multi_index::multi_index_container<boost::intrusive_ptr<Column>,
+typedef boost::intrusive_ptr<Column> ColumnPtr;
+typedef boost::multi_index::multi_index_container<ColumnPtr,
boost::multi_index::indexed_by<
boost::multi_index::ordered_unique<
boost::multi_index::tag<byColName>, BOOST_MULTI_INDEX_MEMBER(Column, const std::string, key)>,
diff --git a/project2/common/rowSet.cpp b/project2/common/rowSet.cpp
index 6ec2f94..702aec1 100644
--- a/project2/common/rowSet.cpp
+++ b/project2/common/rowSet.cpp
@@ -13,19 +13,11 @@ RowSet::RowSet(ScriptNodePtr p) :
{
}
-RowSet::~RowSet()
-{
-}
-
RowState::RowState() :
rowNum(0)
{
}
-RowState::~RowState()
-{
-}
-
void
RowState::process(const RowProcessorCallback & rp, bool r)
{
diff --git a/project2/common/rowSet.h b/project2/common/rowSet.h
index 50dd3fd..e6793c5 100644
--- a/project2/common/rowSet.h
+++ b/project2/common/rowSet.h
@@ -24,7 +24,7 @@ class RowSet : public SourceObject {
SimpleNumericException(FieldOutOfRange);
RowSet(ScriptNodePtr);
- virtual ~RowSet() = 0;
+ virtual ~RowSet() = default;
virtual void execute(const Glib::ustring &, const RowProcessorCallback &, ExecContext *) const = 0;
};
@@ -32,7 +32,7 @@ class RowSet : public SourceObject {
class RowState {
public:
RowState();
- virtual ~RowState();
+ virtual ~RowState() = default;
typedef boost::function0<VariableType> RowAttribute;
typedef boost::function3<void, unsigned int, const Glib::ustring &, const VariableType &> ColumnAction;
diff --git a/project2/common/sourceObject.cpp b/project2/common/sourceObject.cpp
index aa81d01..6ddec89 100644
--- a/project2/common/sourceObject.cpp
+++ b/project2/common/sourceObject.cpp
@@ -23,10 +23,6 @@ SourceObject::SourceObject(const std::string & n) :
{
}
-SourceObject::~SourceObject()
-{
-}
-
void
SourceObject::loadComplete(const CommonObjects *)
{
diff --git a/project2/common/sourceObject.h b/project2/common/sourceObject.h
index 935cead..1af9ceb 100644
--- a/project2/common/sourceObject.h
+++ b/project2/common/sourceObject.h
@@ -23,7 +23,7 @@ class SourceObject : public virtual IntrusivePtrBase {
SourceObject(ScriptNodePtr p);
SourceObject(const std::string & name);
- virtual ~SourceObject() = 0;
+ virtual ~SourceObject() = default;
virtual void loadComplete(const CommonObjects *);
diff --git a/project2/common/variables.cpp b/project2/common/variables.cpp
index a2a9004..eb36d7a 100644
--- a/project2/common/variables.cpp
+++ b/project2/common/variables.cpp
@@ -100,10 +100,6 @@ Variable::Variable(VariableImpl * v) :
{
}
-VariableImpl::~VariableImpl()
-{
-}
-
Variable &
Variable::operator=(const VariableType & vt)
{
diff --git a/project2/common/variables.h b/project2/common/variables.h
index e0f1e00..cee9037 100644
--- a/project2/common/variables.h
+++ b/project2/common/variables.h
@@ -20,7 +20,7 @@ class VariableImpl : public IntrusivePtrBase {
virtual VariableType value(ExecContext *) const = 0;
protected:
- virtual ~VariableImpl() = 0;
+ virtual ~VariableImpl() = default;
};
class Variable {