понедельник, июня 26, 2006

Приколы продолжаются

Друзья из MS статейку на днях вывесили. Теперь придётся код перебирать, чтоб ихние рекомендации реализовать.

In scenarios in which you use SharePoint objects extensively―for example, in SharePoint sites that use custom Web Parts―you can cause the following unusual behaviors by not disposing of those objects that can be disposed of:
  • Frequent recycles of the Microsoft Windows SharePoint Services application pool, especially during peak usage
  • Application crashes that appear as heap corruption in the debugger
  • High memory use for Microsoft Internet Information Services (IIS) worker processes
  • Poor system and application performance

Several of the Windows SharePoint Services objects, primarily the SPSite class and SPWeb class objects, are created as managed objects. However, these objects use unmanaged code and memory to perform the majority of their work. The managed part of the object is small; the unmanaged part of the object is much larger. Because the smaller managed part of the object does not put memory pressure on the garbage collector, the garbage collector does not release the object from memory in a timely manner. The object's use of a large amount of unmanaged memory can cause some of the unusual behaviors described earlier. Calling applications that work with IDisposable objects in Windows SharePoint Services must dispose of the objects when the applications finish using them. You should not rely on the garbage collector to release them from memory automatically.

Вроде, пару лет назад всего этого никто не знал... И, самое смешное, и в "новой" версии всё так же и осталось.

Комментариев нет: