20 Dec: Must Read Codes [6-10]
We are sharing few must read codes/concepts which are required now and then. Each of these codereads doesn’t require a full length descriptive article so combining them into groups of five.
What is the difference between Dispose and Finalize?
#Point 1, Dispose is used to release unmanaged resources in a deterministic fashion, like we know when to release the resource. Finalize method is also used for the purpose of releasing resources but in non-deterministic fashion like we cannot be sure as when Garbage Collector will collect the resource.
#Point 2 , Finalize method has a performance drawback due to the Garbage Collector as there will be two iterations of Garbage Collector and override operation.
Garbage Collector maintains managed objects in “generations.” The generation indicates the lifetime of an object like objects having short life are stored in lower generations as GC runs much more frequently to clean up objects in the lower generations. The more the objects survive a GC cleanup, the more the chances that these objects will get moved to higher generations. There will be few GC swipes on higher generations and also that will happen only if lower generations have no space left. When we talk about generations, we talk about physical memory locations divided,managed and allocated to each generation number.
.data() : Store arbitrary data associated with the matched elements or return the value at the named data store for the first element in the set of matched elements.
For more information: http://api.jquery.com/data/
Elements of a UML Class Diagram are:
Constraint Rules and Notes
Scaffolding is a technique in which the programmer may write a specification that describes how the application database may be used. With the help of this concept,programmer can create a functional Web site for viewing and editing data based on the schema of the data.
ASP.NET Dynamic Data supports scaffolding. Refer the below link.
For more information: http://msdn.microsoft.com/en-IN/library/ee845452%28v=vs.100%29.aspx