It's been a few weeks since I have blogged, was a bit hooked up on catching on with some of the MS technologies.I started learning the ADO.Net entity Framework, downloaded some videos, samples and ye, did some pretty intresting stuffs with it.Then there was last week, when one of my friends asked me a question on web services, got a bit confused and I had to dig into some of the ws-* standards and WCF Security, and finally thought of going through the specificaions at w3c, and I ended up reading the ws-security and ws-addressing spec.Then there was this week, started looking at some presentations on the ADO.Net data services on MIX 08, still doing this !!!. and another thing about all these is that I am getting not much of time to do all these readings, cos' I have hooked up into some of the old cartoons that I always wanted to watch, like the X-Men, King Artuher, The Mask etc...Well for all, I guess its better late then never !!!
This is a post about object finalization in .NET. Finalization is not as inexpensive as we think, it increases the pressure put on GC.All objects that need finalization are moved into a finalizable queue and the actual finalization happens in a separate thread. Because the objects full state may be needed, the object itself and all the object it points to are promoted to the next generation (this is needed so that GC does not clean these objects off in the current round), and these objects are cleaned up only after the following GC. Due to this reason, resources that need to be released should be wrapped in as small a finalizable object as possible, for instance if your class needs a reference to an unmanaged resource, then you should wrap the unmanaged resource in a separate finalizable class and make that a member of your class and furthermore the parent should be a non-finalizable class. This approach will assure that only the wrapped class (class that contains the unmanaged resourc...
Comments
Post a Comment