.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Draining memory

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
SRSDS
601 Views, 3 Replies

Draining memory

I am debugging my app in Visual Studio which responds to many events.

Something is causing Visual Studio to bloat in memory to slowly become unresponsive.

I've no idea what variables might be chugging up data.

3 REPLIES 3
Message 2 of 4
moogalm
in reply to: SRSDS

Without any code sample it is difficult to suggest or diagnose the performance issue. Pl. provide a minimal sample that we can recreate the behavior at our end. 

 

Please check in debugger output if this 'Forget Call to Dispose' problem ?

 

C++ uses destructors to clean up resources. ObjectARX managed wrappers implement the IDisposable interface to do the same. The managed wrappers derive from the common base class DisposableWrapper, whose purpose is to manage the unmanaged memory. Because the underlying resources used by ObjectARX managed wrappers are unmanaged classes, you must actively call Dispose on the managed wrappers. Doing so releases the resources owned by base types all the way up the hierarchy.

Do not rely on .NET garbage collection to free the memory used by unmanaged resources.

 

using Statement (C# Reference),provides a convenient syntax that ensures the correct use of IDisposable objects.

 

Message 3 of 4
SRSDS
in reply to: moogalm

Hi,

I'm not sure about this but maybe the problem has fixed itself or maybe I've corrected something that was causing the problem.

Would leaks in my app make Visual Studio's memory bloated or AutoCAD's memory?

I was thinking that my app is running inside AutoCAD so it might not be a issue with the app at all.

 

I did find this article that covers identifying memory leaks but I didn't get too far into it.

 

Can I mark this thread as resolved?

 

 

 

 

 

Message 4 of 4
moogalm
in reply to: SRSDS

Thanks for the update !, your app [i.e. your assembly ] is in AutoCAD memory, as it is a in-process application.

The Memory Profile is good handy tool.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


AutoCAD Beta