MCPcopy Index your code
hub / github.com/g3n/engine / RemoveAll

Method RemoveAll

core/node.go:453–463  ·  view source on GitHub ↗

RemoveAll removes all children.

(recurs bool)

Source from the content-addressed store, hash-verified

451
452// RemoveAll removes all children.
453func (n *Node) RemoveAll(recurs bool) {
454
455 for pos, ichild := range n.children {
456 n.children[pos] = nil
457 ichild.GetNode().parent = nil
458 if recurs {
459 ichild.GetNode().RemoveAll(recurs)
460 }
461 }
462 n.children = n.children[0:0]
463}
464
465// DisposeChildren removes and disposes of all children.
466// If 'recurs' is true, call DisposeChildren on each child recursively.

Callers

nothing calls this directly

Calls 1

GetNodeMethod · 0.65

Tested by

no test coverage detected