Skip to content

Commit

Permalink
Merge pull request #2847 from Jacalz/remove-all-slow
Browse files Browse the repository at this point in the history
Add docs for container.Remove() when removing everything
  • Loading branch information
Jacalz committed Mar 14, 2022
2 parents 39b36b1 + 929b6ff commit ed8d41a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions container.go
Expand Up @@ -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
Expand Down

0 comments on commit ed8d41a

Please sign in to comment.