Build your professional network on facebook via our app Go to app
 
<< Prev  2 of 2 in Topic 
Posted in Community :

.Net Champions |

.Net

 
Created by : Kiran Kumar Reddy, Business Analyst, SAP  | 10 30 2008 14:22:19 +0000
Industry : IT ProductsFunctional Area : Programming Languages(Technology)
Activity:  440 views;  last activity : 07 06 2010 20:18:09 +0000
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.
 
Share
 
 
  Rate : 
 
 
.NET Vs Other Programming Language
10
 
 
 
 
3
5
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  10 30 2008 14:22:19 +0000
 
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, Owner, Arkro IT  04 09 2009 09:58:50 +0000
0
0

I think .net provides better memory management than any other programming language


By vinod mathew, Product Development Manager, Hykon Transcripts  | 08 12 2009 17:09:01 +0000
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 , Senior Research Engineer  | 06 09 2009 07:30:51 +0000
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.  | 05 28 2009 06:25:56 +0000
0
0

I agree with Kumar's Statement


By Syed Fasih-ud-Din, Team Leader -(Technical), Bizsoft Technologies  | 05 02 2009 08:45:22 +0000
Leading Recruitment Firm
Leading Recruitment Firm
Viewers also viewed
JAVA vs .NET
 
0 referals 10 arguments, 809 views
An organisation with more than 150 years of service  the India post which today boasts of one of...
 
432 referals 35 arguments, 336 views
yes,women can make better managers vs against the debate
 
0 referals 41 arguments, 938 views
more...  
Recent Knowledge (80)
NO, CONGRESS IS BETTER THAN BJP vs BJP IS BETTER THAN CONGRESS
 
98 referals 66 arguments, 388 views
if Baba's business was successful wht's his fault? vs This country can only have rich...
 
1701 referals 27 arguments, 269 views
JSP vs C#
 
0 referals 4 arguments, 30 views
more...  
More From Author
You can say that money does not bring happiness but I want to ask "REALLY".. Think if you had no money what would you do? You would not be able to satisfy your needs. Anyone who does not earn sufficient money suffers from depression and lack of self...
Would you buy a ticket to watch football game ??
There is a lot more than just illiteracy. There are few women who have made a mark but the number is too less and there rises the concern. If all the women come up to show their power things will change drastically.
more...