Skip to content

Modern LinkedList Clear

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › LinkedList › LinkedList › Clear

Clear

Removes every value and frees its nodes.

Syntax

Clear( )

Notes

  • O(n)

Examples

#import "std/containers"
using containers

dim q as LinkedList( of ustring )
q.PushBack( "a" ) : q.PushBack( "b" )

q.Clear( )               '' frees every node
print q.Count            '' 0
print q.IsEmpty          '' true

Library: LinkedList
Category: LinkedList
Documented under: Members

Clone this wiki locally