Extreme DevCon 2013

Monday, July 15, 2013

Next week, John Bryce Training, along with some of its partners, set up a two day conference named Extreme Dev Con 2013, on the 22nd and 23rd of July in Hertzliya (Israel). The conference consists mainly of full one-day seminars, several happening at the same time (naturally).I will be presenting a full day seminar, titled something like “.NET deep dive for performance”. The rough topics are listed in the above link, but basically I will cover various topics that somehow relate to that elusive thing called “performance”. From process and AppDomains, through the garbage collector and friends, threads and...

Windows 8 & Phone 8 UG August Meeting

Wednesday, August 29, 2012

Last evening we had a User Group meeting in Microsoft Offices in Ra’anana, with a lot of activity and fun. Thank you all for participating!In the first part, we discussed the Windows 8 Store from various angles, end user and developer.In the second part, we discussed Windows Phone 7.x and the upcoming 8, along with other sporadic topics - C++, WinRT, DirectX, COM, XNA, XAML… it was fun! And don’t forget the giveaways!Just as a gentle reminder, out next meeting is on September 13th, where we’ll have an interesting session on “Metro” User Experience and User Interface from an...

What’s New in CLR 4.5 Debugging API?

Tuesday, April 3, 2012

The most used command in the SOS extension DLL is probably !dumpheap. This command is able to show every object on the managed heap. This capability has no match within Visual Studio. The reason is that Visual Studio uses the CLR debugging API, that doesn’t seem to have this capability. At first glance, the ICorDebugProcess interface has the perfect method: EnumerateObjects. What could be better than that? Unfortunately, the documentation states that this method is not implemented… bummer. A while back I created a project CLR Explorer. This was supposed to be a tool to look at managed processes....

A ‘Proper’ WeakReference Class

Saturday, June 4, 2011

The WeakReference class that exists since .NET 1.0 can be used to wrap an object while not being the one keeping it alive. This may be useful in an “Observer” pattern scenario, where a client registers for some notification, but “forgets” to unregister. That means that with a normal reference, even if the client is no longer needed, it keeps getting notifications because the server object keeps a strong reference to the client. Here’s a simple example: class BasicSubject { ...
tags: , , ,
2 comments

PSSCOR4 Debugger Extension Released

Friday, April 29, 2011

A while back, Microsoft released the PSSCOR2 debugger extension for WinDbg, supporting more command than the classic SOS.DLL. This was for CLR v2 (.NET 2-3.5). Now a similar extension has been released for CLR 4 (.NET 4). You can download it here. There are versions for x86 and x64. The easiest way to use them is copy the relevant DLL to the .NET framework directory for the corresponding “bitness” (where SOS lives, something like C:\Windows\Microsoft.NET\Framework\v4.0.30319 (32bit) or C:\Windows\Microsoft.NET\Framework64\v4.0.30319 (64bit)) and then use .loadby psscor4 clr to load the extension. Then type !help to look at all the...
2 comments

Windows Platform Developers User Group meeting

Wednesday, October 6, 2010

This evening was a WPDUG meeting on CLR hosting and CLR profiling. Thank you all for coming! It was a pleasure to see so many of you there. My session was on CLR hosting, using the new CLR 4 hosting API. This is done using native code (C++) that uses COM for communication between the CLR and the host, both ways. I showed how to enumerate the installed runtimes, how to load a specific CLR (a new feature of CLR 4 – the ability to host multiple CLRs in a single process), how to create an application domain...

My C# 5.0/CLR 5 Wish List

Sunday, August 22, 2010

C# 5.0 is probably in the works (for sure). A while back I blogged about features I’d like to see in C# 4.0. I didn’t get any of my wishes (well, maybe I got one wish in an unexpected way, more on that later). Here’s a list of features I’d love to see in the next version of the C# language and the CLR. It’s not yet Christmas, but maybe Microsoft’s Santa needs some time to make these wishes come true: operator constraints This is something I wished for with C# 4.0, but didn’t get. Well, I...
tags: , , , ,
11 comments

My Developer Academy 4 Session

Monday, March 22, 2010

Today, I presented the session entitled “.NET 4: What’s new in the CLR and BCL?”. Thank you all for attending! I didn’t get the chance to do all the demos I wanted because of time constraints (I always try to stuff more that is possible in the allotted time, and even “stole” a few minutes extra), but I hope the message went through: there are improvements all over the board that will impact almost any type of application. I suggest you download the demos and slides from the developer academy 4 site (they should be there in...
8 comments

WeakReferences and Events

Thursday, January 7, 2010

One of the well-known pitfalls of using events, is the holding of the subscriber instance by the publisher (if connecting to a delegate holding an instance method). If the subscriber forgets to unsubscribe, the instance cannot be garbage collected because the publisher holds a reference to it. Worse yet, the subscriber continues to receive event notifications even though it’s not interested. One way to deal with this is presented in Jeffrey Richter’s book “CLR via C#”. The idea is based on a custom event implementation holding a list of WeakReference objects to the incoming subscribers delegates: ...
tags: , , ,
one comment

PDC Report: Day 3

Thursday, October 30, 2008

In my previous report, I forgot to mention one more significant product update: Office. The next version of Office (“Office 14”) will have an online version, complete with the famous Ribbon and all major editing capabilities. In addition, synchronization services will allow nice, seamless sync between an online and offline versions, including the ability to open the same file by multiple users for editing with automatic or manual updates. On with day 3! Today’s keynote was by Rick Rashid, the head of Microsoft Research. After some general introduction to his division – MS research is one of...