[Mono-dev] [PATCH] Dir.Services - small refactoring

Eyal Alaluf eyala at mainsoft.com
Sun Jan 29 03:37:46 EST 2006


Hi, Kosta.

I have two remarks regarding the change in ObjectArray:
   * You should use the 'Clear' method instead of setting 'this[i] = null'.
   * The original code documents that it is clearing up the original array. It even tries
     to do this using 'ToSrray()[i] = null'. However, this is a serious bug becuase
     'ToArray()' always creates a new array each time  and so doing 'ToArray()[i] = null'
     has absolutely no side effects (except on performance :-). I believe that you should
     verify that fixing this bug has no side effects in System.DirectoryServices code.

Eyal.

On Thu, 26 Jan 2006, Konstantin Triger wrote:

> Date: Thu, 26 Jan 2006 04:36:52 -0800
> From: Konstantin Triger <kostat at mainsoft.com>
> To: mono-devel-list at lists.ximian.com
> Subject: [Mono-dev] [PATCH] Dir.Services - small refactoring
> 
> Hello all,
>
>
>
> I made some refactoring reducing number of objects created.
>
> Please review the attached patch before I commit.
>
>
>
> Regards,
>
> Konstantin Triger
>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: perf.patch
Type: application/octet-stream
Size: 2347 bytes
Desc: perf.patch
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060129/90ff2c92/attachment.obj 
-------------- next part --------------
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


More information about the Mono-devel-list mailing list