Friday, January 22, 2010
Thursday, January 21, 2010
JavaScript Closures
Javascript closures can cause memory leaks and should be used with care. Click here to learn more.
The pattern of public, private, and privileged members is possible because JavaScript has closures. What this means is that an inner function always has access to the vars and parameters of its outer function, even after the outer function has returned. There is no book currently available on JavaScript programming that shows how to exploit it.
For a good Javascript book click here.
Javascript closures:
The pattern of public, private, and privileged members is possible because JavaScript has closures. What this means is that an inner function always has access to the vars and parameters of its outer function, even after the outer function has returned. There is no book currently available on JavaScript programming that shows how to exploit it.
For a good Javascript book click here.
Javascript closures:
Managed Threading Best Practices
".NET Framework Developer's Guide" has important threading concepts for .NET development.
Managed Threading Best Practices can be found here.
Click Event-based Asynchronous Pattern Overview to read about even based asynchronous pattern and its implementation.
Additional threading info below:
Threads and Threading
The Managed Thread Pool
Exceptions in Managed Threads
Managed Threading Best Practices can be found here.
Click Event-based Asynchronous Pattern Overview to read about even based asynchronous pattern and its implementation.
Additional threading info below:
Threads and Threading
The Managed Thread Pool
Exceptions in Managed Threads
Wednesday, January 20, 2010
WPF Threads
Learn about how WPF handles threads. WPF now offers two UI threads. Click on WPF Threads
and WPF Threading Model to learn more....
and WPF Threading Model to learn more....
Memory Leaks with Delegates
When adding delegate (+=), you should remove it (-=) in order to release the delegate object and allow the GC to collect it. If a delegate maintains a reference to an externally declared object, and is not removed (-=), you will have a memory leak. For more details, click this article.
Monday, January 18, 2010
Inversion of Control Containers and the Dependency Injection pattern
Click on Inversion of Control Containers and the Dependency Injection pattern to learn more about Dependency Injection patterns.
Also, check out Create Elegant Code With Anonymous Methods, Iterators, And Partial Classes to learn elegant C# coding tips.
Also, check out Create Elegant Code With Anonymous Methods, Iterators, And Partial Classes to learn elegant C# coding tips.
Thursday, January 7, 2010
Improve Garbage Collector Performance using Finalize/Dispose pattern
After reading an article that demonstrated how to improve GC performance (i.e., maximize size of Gen 0, minimize Gen 1 and Gen 2), I will refer to the Dispose pattern documentation on Microsoft site. The GC article is a good starting point and can be complemented by reading the Garbage Collection chapter in the "CLR via C#" book (i.e., where you will learn that large objects get placed directly on Gen 2 and more details not mentioned in this GC article).
It is very important to understand and implement the Dispose pattern correctly. If you do not, your application may do mysterious things, and it will not be the GC fault.
For details about Garbage Collector internals and more, read CLR via C# book (note in Feb 2010, Third edition of this book will be released).
For improving performance of your .NET applications check out the Microsoft Patterns and Practices.
It is very important to understand and implement the Dispose pattern correctly. If you do not, your application may do mysterious things, and it will not be the GC fault.
For details about Garbage Collector internals and more, read CLR via C# book (note in Feb 2010, Third edition of this book will be released).
For improving performance of your .NET applications check out the Microsoft Patterns and Practices.
Subscribe to:
Posts (Atom)
