public static IMemoryPool <Treap <Value> > Clear(Treap <Value> t, IMemoryPool <Treap <Value> > alloc) { if (t == null) { return(alloc); } for (var i = 0; i < 2; i++) { Clear(t.ch [i], alloc); } return(alloc.Free(t.Clear())); }
public ITreapController <Value> Clear() { Treap <Value> .Clear(Root, _pool); return(this); }