memory

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
lulu
Posts: 25
Joined: 12 Nov 2009, 19:55

memory

Post by lulu » 23 May 2012, 12:09

Hello Alexander,

I have a problem with CADPictureBox.
I have a form that contains a CADPictureBox. When I close this form, the memory allocated for the drawing visualization isn't released.
I use the method Dispose() on my form and also on CADImage of my CADPictureBox, but it doesn't solve the problem.

How can I release the memory?
It is very important for me to solve this issue. Can you help me?

Thanks,
Lulu.

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: memory

Post by support » 23 May 2012, 15:59

Hello Lulu.
We have tested mentioned issue on latest library version. Closing the Form with CADPictureBox object results in releasing memory. Please specify the assembly version that produces the problem. Does the problem appear on one of provided demo projects or your own project? If last then please send a project that demonstrates the issue to support@cadsofttools.com.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

lulu
Posts: 25
Joined: 12 Nov 2009, 19:55

Re: memory

Post by lulu » 23 May 2012, 17:33

Hi Alexander,

I'm working with CADImport.NET 7.2.7.
I have tested your demo (related to my version). When I load a CAD file, the system allocates the memory, but when I close the drawing, the memory isn't released. I've also see that when I open another CAD file, the memory allocation decreases (to deallocate the previous file) and then increases.
There is a specific method that I must use to release the memory? Otherwise, it is possible to have it?

Thanks!
Lulu.

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: memory

Post by support » 24 May 2012, 12:24

Hello Lulu.
Closing a drawing results in disposing CADImage and CADImage.Converter objects. Calling Dispose() not results in releasing memory because the IDisposable interface has no connection to the garbage collector. The CLR provides automatic memory management. Importing another drawing will result in memory re-allocation, consumption can increase or decrease. Form closing will release memory.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply