How to properly dispose of a class variable and avoid IDE0069?

  • Thread starter Thread starter Brian Tkatch
  • Start date Start date
B

Brian Tkatch

Guest
I am using Selenium in my project, and have a class variable for ChromeDriver. The UI reports IDE0069 "Disposable field 'Browser' is never disposed". I find that interesting, because the code handles both its instantiation and disposal (via Browser.Quit()). Perhaps the analyzer doesn't realized it is called? Not being sure what to do, i tried putting the code in a routine that Handles MyBase.FormClosing and even FormClosed, to no avail.

What does the UI want me to do to properly dispose of the object?

Continue reading...
 
Back
Top