Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Current status of lifetime management? #967

Open
@ziriax

Description

@ziriax

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions