GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Microsoft  >  Microsoft.NET
Next Question 
 Microsoft.NET  |  Question 1 of 38    Print  
In .NET Compact Framework, can I free memory explicitly without waiting for garbage collector to free the memory?

  
Total Answers and Comments: 14 Last Update: May 22, 2007     Asked by: swaroop 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Bala
 
yes, you can. However you have to explicitly instantiate the Garbage collector and use the collect method.

Above answer was rated as good by the following members:
swapnalatha
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
September 21, 2005 14:53:25   #1  
Bala        

RE: In .NET Compact Framework, can I free memory expli...
yes you can. However you have to explicitly instantiate the Garbage collector and use the collect method.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
October 04, 2005 06:43:21   #2  
ajayakumar        

RE: In .NET Compact Framework, can I free memory expli...
yeah we can free memory explicitly
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
October 07, 2005 03:41:10   #3  
sudhakar        

RE: In .NET Compact Framework, can I free memory expli...
Yeah ! You can Explicitly Deallocate the Memory Allocation
 
Is this answer useful? Yes | No
October 11, 2005 04:57:23   #4  
arun thakur        

RE: In .NET Compact Framework, can I free memory expli...

.NET Compact Framework come with CLR which perform automatic

garbage collector to free the memory without using destector(perform

garbage collector when is declear)



 
Is this answer useful? Yes | No
October 11, 2005 11:34:13   #5  
rajesh iyer        

RE: In .NET Compact Framework, can I free memory expli...
yes you can deallocate the memory by calling the finalise method explicitly.
 
Is this answer useful? Yes | No
October 20, 2005 07:47:53   #6  
hemant        

RE: In .NET Compact Framework, can I free memory expli...

Call Collect() method of Garbage collector class.


 
Is this answer useful? Yes | No
November 14, 2005 03:50:08   #7  
Vinoth Kumar A        

RE: In .NET Compact Framework, can I free memory expli...
in vb.net we have explict call Idispoable method to collect the free memory.. the default of the vb.net is finalize method.
 
Is this answer useful? Yes | No
December 22, 2005 21:58:08   #8  
phanikumar        

RE: In .NET Compact Framework, can I free memory expli...

<variablename>.dispose() can be used however the garbage collection happens only when the garbage collector runs within in schedules. only difference is the memory is freed what ever it was allocated except the memory allocated to store object name is still in memory.

moreover its not advisable to call garbage collector to run explicitely as this becomes a performance overhead for the application as well as for the webserver itself.


 
Is this answer useful? Yes | No
January 09, 2006 06:40:19   #9  
Bharat Joshi        

RE: In .NET Compact Framework, can I free memory expli...

As far as i know there is not a particular way to realese memory in dotnet although there are destructor(dispose) but they dont invoke when object loose her scope it waits for garbage collector and if we talk about gc.collect() here also the work done by garbage collector

so we can say there is no way to realese meomry explicitly


 
Is this answer useful? Yes | No
December 21, 2006 15:55:39   #10  
Rishi        

RE: In .NET Compact Framework, can I free memory expli...

Yes Dude

it is possible.

Use GC.Collect


 
Is this answer useful? Yes | No
  Page 1 of 2   « First    1    2    >     Last »  


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape