Class: RBTree::NodeAllocator Private
- Inherits:
-
Object
- Object
- RBTree::NodeAllocator
- Defined in:
- lib/rbtree.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Allocator for RBTree nodes.
Direct Known Subclasses
Instance Method Summary collapse
- #allocate(key, value, color, left, right, parent) ⇒ Object private
-
#discard(count) ⇒ void
private
Notifies the allocator that
countnodes were dropped in bulk rather than released individually, asRBTree#cleardoes. -
#release(node) ⇒ Object
private
Releases a node.
Instance Method Details
#allocate(key, value, color, left, right, parent) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
2329 |
# File 'lib/rbtree.rb', line 2329 def allocate(key, value, color, left, right, parent) = RBTree::Node.new(key, value, color, left, right, parent) |
#discard(count) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Notifies the allocator that count nodes were dropped in bulk rather than
released individually, as RBTree#clear does.
The nodes are not reclaimed for reuse; this only keeps live-node statistics right.
2343 |
# File 'lib/rbtree.rb', line 2343 def discard(count) = nil |
#release(node) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Releases a node.
2334 |
# File 'lib/rbtree.rb', line 2334 def release(node) = nil |