C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Interview   Jobs   Projects   Offshore Development    
Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing | Talk to Us |



My Profile

Gifts

Active Members
TodayLast 7 Days more...









Garbage Collector


Posted Date: 08 Aug 2008      Total Responses: 2

Posted By: Vasundhara       Member Level: Gold     Points: 1


Hi all,

Can anyone tell how many methods are available in gc class....

gc.collect
gc.supressfinalize

and so on..............



Thanks in advance....





Responses

Author: D.Jeya kumar(JK)    08 Aug 2008Member Level: GoldRating:     Points: 4
Hi,

Below are the methods in GC

GC.Collect()
GC.CollectionCount()
GC.AddMemoryPressure()
GC.GetGeneration()
GC.GetTotalMemory(False)
GC.KeepAlive()
GC.RemoveMemoryPressure()
GC.ReRegisterForFinalize()
GC.SuppressFinalize()
GC.WaitForPendingFinalizers()

Regards
JK



Author: Shivshanker Cheral    08 Aug 2008Member Level: DiamondRating:     Points: 6
Method Description
AddMemoryPressure :--> Informs the runtime of a large allocation of unmanaged memory that should be taken into account when scheduling garbage collection.
CancelFullGCNotification :--> Cancels the registration of a garbage collection notification.
Collect :--> Overloaded. Forces garbage collection.
CollectionCount :--> Returns the number of times garbage collection has occurred for the specified generation of objects.
GetGeneration :--> Overloaded. Returns the current generation number of an object.
GetTotalMemory :--> Retrieves the number of bytes currently thought to be allocated. A parameter indicates whether this method can wait a short interval before returning, to allow the system to collect garbage and finalize objects.
KeepAlive :--> References the specified object, which makes it ineligible for garbage collection from the start of the current routine to the point where this method is called.
RegisterForFullGCNotification :--> Specifies that a garbage collection notification should be raised when conditions favor full garbage collection and when the collection has been completed.
RemoveMemoryPressure :--> Informs the runtime that unmanaged memory has been released and no longer needs to be taken into account when scheduling garbage collection.
ReRegisterForFinalize :--> Requests that the system call the finalizer for the specified object for which SuppressFinalize has previously been called.
SuppressFinalize :--> Requests that the system not call the finalizer for the specified object.
WaitForFullGCApproach :--> Overloaded. Returns the status of a registered notification for determining whether a full garbage collection by the common language runtime is imminent.
WaitForFullGCComplete :--> Overloaded. Returns the status of a registered notification for determining whether a full garbage collection by the common language runtime has completed.
WaitForPendingFinalizers :--> Suspends the current thread until the thread that is processing the queue of finalizers has emptied that queue.



Post Reply
You must Sign In to post a response.
Next : urgent OnDataBinding="gvAudits_DataBinding" sample code for gvAudits_DataBinding()
Previous : connection string
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design   Scripts

audio conferencing services

Contact Us    Privacy Policy    Terms Of Use