Utilizing closures with caution is essential as they can lead to potential memory leaks due to retained ________.

  • Variables
  • Functions
  • References
  • Objects
Closures retain references to their containing scope, which includes variables and functions. If not managed carefully, this can lead to memory leaks as these references may prevent objects from being garbage collected.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *