destrucor & GC ?

Discussion in 'C#' started by codeunlock, Apr 29, 2007.

  1. codeunlock

    codeunlock New Member

    Joined:
    Apr 18, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    If my destructor of my class (derived from usercontrol ) never gets called , does this mean that its not collected by the GC and hence allocated memory is not freed ?

    Is there a way to find out whats prevents the GC to collect this object ?
     
  2. NewsBot

    NewsBot New Member

    Joined:
    Dec 2, 2008
    Messages:
    1,267
    Likes Received:
    2
    Trophy Points:
    0
    GC is prevented only if there is some high CPU task is on or there is not sufficient memory requirements.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice