?
Solved

class module dispose - ASP.net app

Posted on 2011-02-12
7
Medium Priority
?
323 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 12

Expert Comment

by:starlite551
ID: 34879507
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 2000 total points
ID: 34879530
Sorry the correct way to call is this way :
GC.Collect();

Open in new window

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 83

Expert Comment

by:CodeCruiser
ID: 34879979
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
ID: 34999317
I am still looking at this issue.  I want this to stay open for now
0
 

Author Closing Comment

by:vbnetcoder
ID: 35296319
ty
0
 
LVL 83

Expert Comment

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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

762 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