Search Communities
  • Search Communities
  • Search Knowledge
  • Search Jobs
  • Search Topics
 
Posted in Community : .Net | .Net Champions
 

Does .NET offer the better memory management ?

Created by : Kiran Kumar Reddy, Business Analyst, SAP  | 8 months ago
Industry : IT ProductsFunctional Area : Programming Languages(Technology)
Activity: 0 referals  198 views;  last activity : 4 days ago
Comparatively which programming language offers a better memory management like the .NET Framework includes a garbage collector which runs periodically, on a separate thread from the application's thread, that enumerates all the unusable objects and reclaims the memory allocated to them. Share your views on this issue.
 
Bookmark this...
 
.NET Vs Other Programming Language
9
 
 
 
 
2
4
1
Support   Support
Top Argument
2
0
.Net and java have common language infrastructure but as far as memory management is concerned .NET provides good memory management. Anyone shed more light on this issue :)
By Kiran Kumar Reddy, Business Analyst, SAP  8 months ago
 
Top Argument
3
1

The .NET Framework's garbage collector manages the allocation and release of memory for your application. Each time you use the newoperator to create an object, the runtime allocates memory for the object from the managed heap. As long as address space is available in the managed heap, the runtime continues to allocate space for new objects. However, memory is not infinite. Eventually the garbage collector must perform a collection in order to free some memory. The garbage collector's optimizing engine determines the best time to perform a collection, based upon the allocations being made. When the garbage collector performs a collection, it checks for objects in the managed heap that are no longer being used by the application and performs the necessary operations to reclaim their memory.

This text (taken from the microsoft website itself) states that the garbage collector will only start to clean up memory when it is absolutely needed. However, this will also mean that allocated memory that is not used for some time will be written to your virtual memory, slowing down the whole process. Other languages (as the age-old c++ for instance) requires the developer to clean up the mess (s)he leaves behind after using an object. This will ensure that the memory is cleaned up as soon as possible. If you run a fair number of applications (be honest, which system runs only what is absolutely nessecary? To ensure all the lights and keys on my laptop work, I need at least 10 little applications to run), you will need to swap memory more often.

Besides that, if you use unmanaged code, you still need to clean up yourself. Even more, If you create an object, dispose of it and create the same object again, the garbage-collector will not allow you to 'reuse' the same memory. If the Garbage Collector would re-init the object after you dispose it and allow the 'new'-keyword to hook into that object, then it might be on to something.

Conclusion: The Garbage Collector is nice for those new developers, but I seriously doubt it will lead to a better world.


By Dennis Aries, Software and Database Architect, Reflecta  2 months ago
Sort by : Latest Strongest
0
0

The grabage collector algorithm does an excellent work in .Net when compared to other languages. Memory leaks are very rare in terms of applications which are not web based. In Web based i too agree there is a scope for improvement as the app domain process and the respective process which kick starts the server request needs to be taken care.

But as a whole, .Net GC provides a great relief with the generation based collecting of memory resources and allocating the same.

 


By Ramprasad , Software Developer MS  | 25 days ago
1
0

.NET Provide better memory management in comparision to other language.It manege the memory through heap allocation.Perodically it checks the memory.Run time memory manage by Garbege collector.Garbage collector is a part of JIT Compiler.It allocate memoey on runtime that object which is ececute currently.After finish the work of that object GC Dellocate the memory of that object and allocated to current object which have need memory currently.

 


By Rajesh Kumar Ranjan, .NET Trainer, CMC Ltd.  | 1 month ago
0
0

I agree with Kumar's Statement


By Syed Fasih-ud-Din, Team Leader -(Technical), Bizsoft Technologies  | 2 months ago
Career portal for Tier 1 IT Services employees!
Citrix Administrator, Global IT Giant, Bangalore Chennai
Weblogic Administrator, Global IT Giant, Bangalore Chennai
Weblogic adminstrator forGlobal IT Giant, Bangalore Chennai
Viewers also viewed
 
0 referals 0 votes, 170 views
 
10 referals 11 comments, 251 views
 
0 referals 0 comments, 49 views
more...  
Recent Knowledge (70)
More From Author
Answered by Kiran Kumar Reddy, Business Analyst, SAP  | 8 days ago
Dear Shaleen, Definitely we can consider "Process Intelligence" as an combination of this two..... And it should also incorporate performance management, compliance management, and risk management. Process Intelligence should be designed to take BI a...
Answered by Kiran Kumar Reddy, Business Analyst, SAP  | 10 days ago
The three key elements of quality which is customer, process and employee, so everything from a product to organization to remain world class will focus on these 3 key elements of quality. In simple terms, Six Sigma quality performance means no more...
How to focus on the key measurements that are there in the Software Quality asurance and how to know that the Quality assurance is progressing as planned??
more...