This is the changelog for developers, != changelog for the end user
that we distribute with the binaries. (see changelog)
+30/04/2006
+SPoG
+- Fixed memory leak in signals library.
+
01/04/2006
SPoG
- Added key-observer interface to entity module API.
class ListIterator
{
public:
- typedef std::forward_iterator_tag iterator_category;
+ typedef std::bidirectional_iterator_tag iterator_category;
typedef std::ptrdiff_t difference_type;
typedef difference_type distance_type;
typedef typename Traits::value_type value_type;
typedef ListDetail::ListNode<Value> Node;
ListDetail::ListNodeBase list;
typedef typename Allocator::template rebind<Node>::other NodeAllocator;
+
+ Node* newNode(const Value& value)
+ {
+ return new (NodeAllocator(*this).allocate(1)) Node(value);
+ }
+ void deleteNode(Node* node)
+ {
+ node->~Node();
+ NodeAllocator(*this).deallocate(node, 1);
+ }
public:
typedef Value value_type;
typedef ListDetail::ListIterator< ListDetail::NonConstTraits<Value> > iterator;
{
list_initialise(list);
}
+ ~List()
+ {
+ for(; list.next != &list;)
+ {
+ Node* node = static_cast<Node*>(list.next);
+ list.next = list.next->next;
+ deleteNode(node);
+ }
+ }
iterator begin()
{
return iterator(static_cast<Node*>(list.next));
{
erase(begin(), value);
}
- iterator insert(iterator pos, const Value& x)
+ iterator insert(iterator pos, const Value& value)
{
- Node* node = new (NodeAllocator(*this).allocate(1)) Node(x);
+ Node* node = newNode(value);
node_link(node, pos.node());
return iterator(node);
}
Node* node = pos.node();
Node* next = node->getNext();
node_unlink(node);
- node->~Node();
- NodeAllocator(*this).deallocate(node, 1);
+ deleteNode(node);
return iterator(next);
}
};