05.07.2008, 06:33 | #1 |
Участник
|
axperf: Debugging X++ Object Leaks
Источник: http://blogs.msdn.com/axperf/archive...ect-leaks.aspx
============== One of the most important aspects of writing managed code that interacts with AX through the Business Connector is cleaning up objects. Each AxaptaObject and AxaptaTable must have dispose called on it before going out of scope, or we’ll leak the object...(read more) Источник: http://blogs.msdn.com/axperf/archive...ect-leaks.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
06.07.2008, 15:09 | #2 |
MVP
|
I'm lost in this story. So general, there is no garbage collection for the .net client?
What happens to the basic software design rule that tells use: The object that creates an object should also delete it. In C++ ad c# it is possible with methods like finalize. Who can help me with my confusion in my head..........
__________________
MVP |
|
07.07.2008, 12:35 | #3 |
Administrator
|
The thing is that the garbage collector cleans up objects only when they go out of scope. Sometimes an object can stay in scope for quite a while holding its memory (especially if .net client stays logged in, logging out forces all object handles to be released). There's a good advice on how to avoid objects staying in scope for too long - always use the using statement.
__________________
Not registered yet? Register here! Have comments, questions, suggestions or anything else regarding our web site? Don't hesitate, send them to me |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|