Dispose DirectX
Posted: Tue Feb 07, 2012 3:33 pm
I am looking at including the DirectX functionality in my program. It all runs just fine, but when terminating I see messages in VS2010 about objects that were not disposed. I noticed this first on my own program and then ran your sample. The same error messages appear on the sample. Yesterday I was running a version of TeeChart dated, I believe, October. Today I downloaded and installed the latest copy. The messages from yesterday were slightly different, but basically meant the same thing.
My program is one where clients would be opening and closing charts regularly. Disposing of objects properly would probably be a good thing.
This is what I see in the Output window in VS2010 after I run and then close your sample:
Object of type SlimDX.Direct2D.Factory was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.WindowRenderTarget was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.Factory was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.WindowRenderTarget was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.Factory was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.WindowRenderTarget was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.Factory was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.WindowRenderTarget was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.Factory was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.WindowRenderTarget was not disposed. Stack trace of object creation:
Object of type SlimDX.DirectWrite.Factory was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.StrokeStyle was not disposed. Stack trace of object creation:
Total of 12 objects still alive.
Any thoughts on this? Is it something to be concerned about? Is there something I can do to call "Dispose" for these items?
My program is one where clients would be opening and closing charts regularly. Disposing of objects properly would probably be a good thing.
This is what I see in the Output window in VS2010 after I run and then close your sample:
Object of type SlimDX.Direct2D.Factory was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.WindowRenderTarget was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.Factory was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.WindowRenderTarget was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.Factory was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.WindowRenderTarget was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.Factory was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.WindowRenderTarget was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.Factory was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.WindowRenderTarget was not disposed. Stack trace of object creation:
Object of type SlimDX.DirectWrite.Factory was not disposed. Stack trace of object creation:
Object of type SlimDX.Direct2D.StrokeStyle was not disposed. Stack trace of object creation:
Total of 12 objects still alive.
Any thoughts on this? Is it something to be concerned about? Is there something I can do to call "Dispose" for these items?