summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-04-25 09:18:04 +0000
committerglisse <glisse@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2015-04-25 09:18:04 +0000
commitef4f1b9b2a6c30777696763198cd4b5494c8ab4d (patch)
tree9fb8c68e2207376b703e45fd694e014bbdc4b356
parent21de85d3cfd3f7b90f3d25aa08132a75aa6a1d98 (diff)
Let destructors do the cleanup.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@573 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: a8e9e64a5317ab368832facdf8e34739cfe9b473
-rw-r--r--src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h3
-rw-r--r--src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h3
-rw-r--r--src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h4
3 files changed, 1 insertions, 9 deletions
diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h
index 4d274f53..3606754a 100644
--- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h
+++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h
@@ -649,8 +649,7 @@ class Persistent_cohomology {
Cell * tmp_cell_ptr = &(*tmp_it);
target.col_.erase(tmp_it); // removed from column
- coeff_field_.clear_coefficient(tmp_cell_ptr->coefficient_);
- cell_pool_.free(tmp_cell_ptr); // delete from memory
+ cell_pool_.destroy(tmp_cell_ptr); // delete from memory
} else {
++target_it;
++other_it;
diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h
index 5d0c9f9f..2349cdac 100644
--- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h
+++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Field_Zp.h
@@ -76,9 +76,6 @@ class Field_Zp {
return plus_times_equal(0, y, (Element)w);
}
- void clear_coefficient(Element x) {
- }
-
Element plus_equal(const Element& x, const Element& y) {
return plus_times_equal(x, y, (Element)1);
}
diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h
index 60ab7f41..c6fd5282 100644
--- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h
+++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology/Multi_field.h
@@ -103,10 +103,6 @@ class Multi_field {
}
}
- void clear_coefficient(Element & x) {
- mpz_clear(x.get_mpz_t());
- }
-
/** \brief Returns the additive idendity \f$0_{\Bbbk}\f$ of the field.*/
const Element& additive_identity() const {
return add_id_all;