Discussion Compare and contrast garbage collection in a structured programming languages such as C and object-oriented programming languages such as VB & C#.Part 2 Assignment This is a continuation of the assignment you have completed in Module Four.• Using Visual Studio, create a project for your proposed application. •Create a sample splash screen for your application (a splash screen is a screen that runs at program startup). This screen should have the application name, your name, the date, and a descriptive note about the purpose of the application. Include a graphic that fits the project; you may use any public domain graphic (i.e.: no licensed or copyrighted material!) or create your own graphic. NOTE: Think about what you can do and how much time it will take. How can you create an interesting application quickly and easily? Think seriously about what coding tasks were easy or interesting for you versus what tasks you disliked. Your goal is to design a practical project that you can complete during this course.

Garbage collection is an important aspect of memory management in programming languages. It refers to the process of automatically reclaiming memory that is no longer in use by the program. In structured programming languages such as C, garbage collection is not built-in and developers are responsible for managing memory manually. On the other hand, object-oriented programming languages such as VB and C# have built-in garbage collection mechanisms.

In C, memory allocation and deallocation are done explicitly using functions like malloc() and free(). Developers have to keep track of memory usage, allocate memory when needed, and release memory when it is no longer needed. This manual memory management can be complex and error-prone. If memory is not properly deallocated, it can lead to memory leaks or dangling references, which can cause the program to crash or consume excessive memory.

In contrast, object-oriented programming languages like VB and C# have automatic garbage collection. Garbage collection in these languages is done by the runtime environment. The runtime environment uses algorithms to determine which objects are still in use and which can be safely reclaimed. When an object is no longer reachable from the program, it is marked for garbage collection. The runtime environment periodically runs the garbage collector to reclaim the memory occupied by these objects.

One of the main advantages of automatic garbage collection is that it reduces the burden on the developer to manually manage memory. Developers no longer have to worry about deallocating memory, as the runtime environment takes care of it. This leads to fewer memory leaks and more reliable and stable programs.

Another advantage of automatic garbage collection is that it allows for dynamic memory allocation. Objects can be created and destroyed at runtime, without explicitly allocating and deallocating memory. This flexibility is particularly useful in scenarios where the memory requirements of the program are not known in advance or vary over time.

However, automatic garbage collection is not without its drawbacks. It introduces some overhead in terms of CPU and memory usage. The garbage collector has to periodically scan the memory to determine which objects can be reclaimed. This scanning process can negatively impact the performance of the program, especially in scenarios where large amounts of memory are allocated and deallocated frequently.

Furthermore, the garbage collector may not always be able to reclaim all the unused memory immediately. There can be situations where objects with references to each other form a cycle, making them still reachable even though they are no longer needed. This is known as a memory leak and can lead to excessive memory usage if not handled properly.

In conclusion, garbage collection plays a crucial role in memory management in programming languages. While structured programming languages like C require manual memory management, object-oriented programming languages like VB and C# provide automatic garbage collection. Automatic garbage collection reduces the burden on developers and allows for dynamic memory allocation, but it introduces some overhead and may not always immediately reclaim all unused memory. Understanding the differences between garbage collection in different programming languages is important for developers to write efficient and reliable programs.

Need your ASSIGNMENT done? Use our paper writing service to score better and meet your deadline.

Click Here to Make an Order Click Here to Hire a Writer