mirror of https://github.com/CGAL/cgal
merge branch origin/Fix_leak-STL_Extension-GF
Remove memory leaks detected by AddressSanitizer. Tested in CGAL-4.4-Ic-54 and CGAL-4.4-Ic-55. Approved by the release manager.
This commit is contained in:
commit
dc6c20cfdb
|
|
@ -612,6 +612,7 @@ void Compact_container<T, Allocator>::merge(Self &d)
|
|||
set_type(d.first_item, last_item, BLOCK_BOUNDARY);
|
||||
last_item = d.last_item;
|
||||
}
|
||||
all_items.insert(all_items.end(), d.all_items.begin(), d.all_items.end());
|
||||
// Add the sizes.
|
||||
size_ += d.size_;
|
||||
// Add the capacities.
|
||||
|
|
|
|||
|
|
@ -555,6 +555,7 @@ public:
|
|||
}
|
||||
} else {
|
||||
h.delete_rep( rep); // we have to delete the current rep
|
||||
tmp->remove_reference();
|
||||
}
|
||||
rep = tmp;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -884,10 +884,11 @@ void test_In_place_list() {
|
|||
assert( l.size() == 5);
|
||||
assert( std::equal( l.begin(), l.end(), b));
|
||||
}
|
||||
|
||||
{
|
||||
typedef CGAL::In_place_list<Cont,false> ContList;
|
||||
typedef CGAL::In_place_list<Cont,false>::iterator Iterator;
|
||||
|
||||
|
||||
ContList L;
|
||||
L.push_back(* new Cont(3));
|
||||
L.push_back(* new Cont(5));
|
||||
|
|
@ -900,7 +901,10 @@ void test_In_place_list() {
|
|||
for (++it2; it2 != L.end(); it1=it2, ++it2) {
|
||||
assert( (*it1).i_ <= (*it2).i_ );
|
||||
}
|
||||
|
||||
L.destroy();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
|
|
|||
|
|
@ -1663,7 +1663,7 @@ void test_Iterator_project()
|
|||
l.destroy();
|
||||
l2.destroy();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
//============================================
|
||||
|
|
@ -1990,7 +1990,7 @@ void test_Iterator_project()
|
|||
l.destroy();
|
||||
l2.destroy();
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
//============================================
|
||||
|
|
@ -2888,8 +2888,14 @@ void test_Iterator_project()
|
|||
}
|
||||
CGAL::Assert_iterator( c_begin);
|
||||
CGAL::Assert_iterator( c_end);
|
||||
|
||||
while(! l.empty()){
|
||||
delete static_cast<item*>(l.back());
|
||||
l.pop_back();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
//============================================
|
||||
|
|
@ -5172,6 +5178,7 @@ void test_Circulator_on_node() {
|
|||
delete start;
|
||||
start = p;
|
||||
}
|
||||
delete end;
|
||||
}
|
||||
}
|
||||
void test_N_step_adaptor() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue