Current status of lifetime management? #967
Description
In the early days of SharpDX, it was adviced to explicitly call Dispose
, not allowing the garbage collector to perform cleanup in the finalizers. Since the .NET runtime doesn't have a concept of GPU memory pressure, I assume this is still the case, but in the past, this often just crashed. This is even stated in the DirectX FAQ:
Does it matter in which order I release DirectX interfaces? It shouldn't matter because COM interfaces are reference counted. However, there are some known bugs with the release order of interfaces in some versions of DirectX. For safety, you are advised to release interfaces in reverse creation order when possible.
What is current status on this? Since we are building a playground for experimenting, we don't care that much about device resources immediately being released, and we would like to just use the garbage collector.
Thanks a lot,
Peter Verswyvelen