Dispose DirectX

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
DaveR
Newbie
Newbie
Posts: 23
Joined: Tue Feb 07, 2012 12:00 am

Dispose DirectX

Post by DaveR » 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?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Dispose DirectX

Post by Sandra » Thu Feb 09, 2012 2:55 pm

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

DaveR
Newbie
Newbie
Posts: 23
Joined: Tue Feb 07, 2012 12:00 am

Re: Dispose DirectX

Post by DaveR » Fri Feb 10, 2012 7:50 pm

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 8695 times

DaveR
Newbie
Newbie
Posts: 23
Joined: Tue Feb 07, 2012 12:00 am

Re: Dispose DirectX

Post by DaveR » Tue Feb 14, 2012 2:38 pm

Are you still unable to duplicate this?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Dispose DirectX

Post by Sandra » Fri Feb 17, 2012 3:17 pm

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
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

DaveR
Newbie
Newbie
Posts: 23
Joined: Tue Feb 07, 2012 12:00 am

Re: Dispose DirectX

Post by DaveR » Fri Feb 17, 2012 10:36 pm

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

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Dispose DirectX

Post by Sandra » Mon Feb 20, 2012 4:22 pm

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply