Page 1 of 1

Dispose DirectX

Posted: Tue Feb 07, 2012 3:33 pm
by 15661493
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?

Re: Dispose DirectX

Posted: Thu Feb 09, 2012 2:55 pm
by 10050769
Hello DaveR,

Sorry for the delay. I can not reproduce your problem unsing last version of TeeChart.Net. Can you please, arrange a simple project because we can reproduce your problem here and try to solve your problem?

Thanks,

Re: Dispose DirectX

Posted: Fri Feb 10, 2012 7:50 pm
by 15661493
Could this be hardware related? I am running Windows 7 PRO, 64-bit.

I can reproduce it every time by:

1 - Open The Direct2DDemo.csproj from "C:\Program Files (x86)\Steema Software\Steema TeeChart for .NET 2011 4.1.2012.01030\Examples\DemoProjectDirect2D".

2 - Click the Go button at the top of VS2010.

3 - After the program begins drawing and updating its chart, simply close the program.

4 - Look at the Output window in VS2010 and you will see:
VS2010.gif
VS2010.gif (168.5 KiB) Viewed 8638 times

Re: Dispose DirectX

Posted: Tue Feb 14, 2012 2:38 pm
by 15661493
Are you still unable to duplicate this?

Re: Dispose DirectX

Posted: Fri Feb 17, 2012 3:17 pm
by 10050769
Hello DaveR,

First sorry for the delay. If you want use TeeChart.NetDirect2D you need install SlimDx as explain the White Paper. Please install last version of SlimDx that you can find here and try again if your problem persist. If you have more problems please let me know.

Thanks

Re: Dispose DirectX

Posted: Fri Feb 17, 2012 10:36 pm
by 15661493
I went to that web site as suggested and installed both 32 and 64 bit versions. I still see the same messages after running your sample program. Don't get me wrong here. The program seems to run fine. I do see a difference between the speeds of the DirectX and GDI versions. My concern is the about the warnings that appear in the Output window in Visual Studios 2010 after I close the program. Before I release something like this on thousands of customers, I really need to know that I will not have memory leaks and things like that.

This is what I get, with the latest SlimDX drivers installed, in the VS2010 Output Window after running the program and then terminating it

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.
The program '[3152] Direct2DDemo.vs

Re: Dispose DirectX

Posted: Mon Feb 20, 2012 4:22 pm
by 10050769
Hello DaveR,

Ok. Can you please send me your Direct2DDemo project? We try to reproduce the problem with your project,so using our project it doesn't appears.

Thanks,