From 929b6ff913848945ed4a0148517002042e2f231d Mon Sep 17 00:00:00 2001 From: Jacob Alzen Date: Mon, 14 Mar 2022 17:52:24 +0100 Subject: [PATCH] Add docs for container.Remove() when removing everything --- container.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/container.go b/container.go index 516e336784..a0130fa949 100644 --- a/container.go +++ b/container.go @@ -139,6 +139,8 @@ func (c *Container) Refresh() { } // Remove updates the contents of this container to no longer include the specified object. +// This method is not intended to be used inside a loop, to remove all the elements. +// It is much more efficient to just set .Objects to nil instead. func (c *Container) Remove(rem CanvasObject) { if len(c.Objects) == 0 { return