Link to home
Start Free TrialLog in
Avatar of vbnetcoder
vbnetcoder

asked on

class module dispose - ASP.net app

I want certain stuff to fun automatically when I dispose of my class module (disconnect from database etc) what procedure should I put that kind of stuff in?
Avatar of s_chilkury
s_chilkury
Flag of United States of America image

Use garbage Collector's Collect method on ur class module..
GC.Collect(object target)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of starlite551
starlite551
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If its a form, use the Closing event. If its module, use the appropriate (i think its Application.Exit) in application events file (access through Project Properties)
Avatar of vbnetcoder
vbnetcoder

ASKER

I am still looking at this issue.  I want this to stay open for now
ty
>what procedure should I put that kind of stuff in?
So would you be putting your stuff in GC.Collect procedure?