Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Threaded Wait Dialog example: compiler warning for statement that calls Dispose on object returned by ThreadedWaitDialogHelper.CreateInstance #47

Open
shaneharper opened this issue Jul 13, 2022 · 0 comments

Comments

@shaneharper
Copy link
Contributor

Regarding
(twd as IDisposable).Dispose();
from the Threaded Wait Dialog example:

  1. The compiler outputs:

     warning CS8602: Dereference of a possibly null reference.
    

    What should be done to get rid of that warning?

  2. Until I saw the example code it had never occurred to me that there could be a need to call Dispose for the object returned by ThreadedWaitDialogHelper.CreateInstance(IVsThreadedWaitDialogFactory). Could a comment be added to the example explaining the need for it? Perhaps the best place to mention it would be in the documentation for CreateInstance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant