AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
DAX
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 21.12.2015, 11:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
mfp: X++ in AX7: Garbage Collection
Источник: http://blogs.msdn.com/b/mfp/archive/...ollection.aspx
==============


In AX 2012 the runtime can either be the .NET CLR executing IL code, or the AX interpreter executing pcode. From a Garbage Collection point of view these two behaves extremely different. The difference is like night and day.


In AX7 only the .NET CLR Garbage Collector is in play.








Native AX interpreter

.NET CLR

Trigger

Immediately – when reference count reaches zero.

Indeterministic – usually when system is low on memory or idle. Can also be on demand.

Performance

Maintaining the reference counts is expensive. More info.
Freeing memory in-proc is expensive, slowing down transactions, etc.
Designed for minimal impact at runtime.



Who cares?

In most situations you don't have to care. The .NET GC will do what you expect. However; if you are dealing with any unmanaged resources, you have to pay attention.

Locks in SQL is a typical unmanaged resource. If your logic uses the UserConnection class to obtain a lock in SQL, and you rely on the GC to release the lock (by aborting the user connection's transaction), then you will experience the lock not being released as you expect. In fact, you may notice it never gets released.

The ReqReaderWriteLock class in AX2012 was doing exactly that. In AX7 this classes is now implementing the System.IDisposable interface. Consumers must ensure dispose() gets invoked. The using statement is handy here.



THIS POST APPLIES TO MICROSOFT DYNAMICS AX7 TECHICAL PREVIEW; IS PROVIDED AS-IS AND CONFERS NO RIGHTS.




==============
Источник: http://blogs.msdn.com/b/mfp/archive/...ollection.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Теги
ax7, reqreaderwriterlock, userconnection, блокировки

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
mfp: X++ in AX7: Const keyword Blog bot DAX Blogs 0 17.12.2015 12:02
mfp: X++ in AX7 Blog bot DAX Blogs 0 02.12.2015 22:13
mfp: Garbage Collection and RPC calls in X++ Blog bot DAX Blogs 0 03.10.2014 00:13
X++: X++ Deterministic Garbage Collection Blog bot DAX Blogs 0 14.01.2012 05:33
X++: Garbage Collection and Ax Performance Whitepaper Blog bot DAX Blogs 6 20.05.2010 18:04
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 15:17.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.