Original Post
Hello, I'm currently struggling with a problem when using smart pointers with Direct3D COM objects. The smart pointer releases the COM resource when the reference count reaches 0. The problem is the order of releasing. The Direct3D device is sometimes destroyed earlier than other resources (e.g.: a surface). Now I need to find a way to ensure that the device is destroyed at last. Could anyone imagine a good solution to this problem?