DCSIMG
February 2012 - Posts - Shimmy on .NET

February 2012 - Posts

0
Comments

Determine if char is Hebrew (2) by Shimmy

About 2 weeks ago I posted a function that determines whether a given char is hebrew: // avoid unicode chars in code private const char FirstHebChar = ( char )1488; //א private const char LastHebChar = ( char )1514; //ת private static bool IsHebrew ( this char c ) { return c >= FirstHebChar && c <= LastHebChar ; } Schabse Laks commented that it won't include punctuation marks / vowels etc. This week I needed a more sophisticated function that does the job, so I ended up with the...
תגים:, , , , ,
1
Comments

LeakEvent → WeakEvent by Shimmy

I'm sure not any Silverlight developer is aware of the fact that when one subscribes to an event, a strong reference to the handler class ('target') is attached to the event source ('source'), hence, if the source object life-cycle is longer than the target, memory is leaked, becuase when you don't need the target anymore and all its references are removed, there is still one reference to it by that event handler in the source, and thus, won't get collected by GC. A strong...
Powered by Community Server (Commercial Edition), by Telligent Systems