You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 30, 2019. It is now read-only.
If you use Outputs[n] to get an output from an Adapter it loads up all of the Outputs but does not dispose of them. If you use the GetOutput(n) (which is obsolete) this issue does not occur.
Looking at the code the outputs are also regenerated to a method level list on each call to Outputs[n] where GetOutput(n) uses different code to achieve this result so perhaps implementing the GetOutput code would be more efficient.
The text was updated successfully, but these errors were encountered:
This is somewhat by design. All returned properties in SharpDX that are ComObject must be disposed explicitly by the client (there are very few exceptions, but mostly). Meaning that when you are using:
varoutputs=adapter.Outputs;// process outputs// store them...etc.{ ...}// laterforeach(varoutputinoutputs)output.Dispose()
If you use Outputs[n] to get an output from an Adapter it loads up all of the Outputs but does not dispose of them. If you use the GetOutput(n) (which is obsolete) this issue does not occur.
Looking at the code the outputs are also regenerated to a method level list on each call to Outputs[n] where GetOutput(n) uses different code to achieve this result so perhaps implementing the GetOutput code would be more efficient.
The text was updated successfully, but these errors were encountered: