Solved

class module dispose - ASP.net app

Posted on 2011-02-12
7
268 Views
Last Modified: 2012-05-11
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?
0
Comment
Question by:vbnetcoder
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 9

Expert Comment

by:s_chilkury
Comment Utility
0
 
LVL 12

Expert Comment

by:starlite551
Comment Utility
Use garbage Collector's Collect method on ur class module..
GC.Collect(object target)

Open in new window

0
 
LVL 12

Accepted Solution

by:
starlite551 earned 500 total points
Comment Utility
Sorry the correct way to call is this way :
GC.Collect();

Open in new window

0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 83

Expert Comment

by:CodeCruiser
Comment Utility
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)
0
 

Author Comment

by:vbnetcoder
Comment Utility
I am still looking at this issue.  I want this to stay open for now
0
 

Author Closing Comment

by:vbnetcoder
Comment Utility
ty
0
 
LVL 83

Expert Comment

by:CodeCruiser
Comment Utility
>what procedure should I put that kind of stuff in?
So would you be putting your stuff in GC.Collect procedure?
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now