Terminology
Boxing ¶ The act of packaging a value type inside an instance of Object. The extra work required when your code causes a value type to be allocated on the heap rather than the stack.
Code Heap ¶ definition: 'The Code Heap stores the actual native code instructions after they have been Just in Time Compiled (JITed).'
Large Object Heap (LOH) ¶ definition: 'The Large Object Heap stores allocated objects greater than 85K, with some exceptions.'
Small Object Heap (SOH) ¶ definition: 'The Small Object Heap stores allocated objects that are less than 85K in size.'
String.Join(<delimiter>,<IEnumerable>) ¶ Build a string from an IEnumerable<>.
System.Text.ASCIIEncoding.ASCII.GetString(<byteArray>) ¶ Convert a byte array to a string.
System.Text.Encoding.ASCII.GetBytes(<string>) ¶ Convert a string to a byte array.
Facts, Thoughts and Opinions
ADO.net Overview
ADO.NET provides consistent access to data sources such as SQL Server and XML, and to data sources exposed through OLE DB and ODBC. Data-sharing consumer applications can use ADO.NET to connect to these data sources and retrieve, handle, and update the data that they contain.
ADO.NET separates data access from data manipulation into discrete components that can be used separately or in tandem. ADO.NET includes .NET Framework data providers for connecting to a database, executing commands, and retrieving results. Those results are either processed directly, placed in an ADO.NET DataSet object in order to be exposed to the user in an ad hoc manner, combined with data from multiple sources, or passed between tiers. The DataSet object can also be used independently of a .NET Framework data provider to manage data local to the application or sourced from XML.
.Net Garbage Collection
.Net achieves automatic cleanup with the Garbage Collector (GC). All the GC does is look for allocated objects on the heap that aren’t being referenced by anything. The most obvious source of references, as we saw earlier, is the stack. Other potential sources include:
- Global/Static object references
- CPU registers
- Object Finalization references (more later)
- Interop references (.NET objects passed to COM/API calls)
- Stack references
Collectively, these are all called root references or GC Roots.
Images
- Subtopics
- Writings
Sources & Bookmarks