A clever person solves a problem. A wise person avoids it.
- Einstein
News
Site News
Latest Comments
Affiliates
Proxies
Contribute!
Chat
Tutorials
Newest Articles
Most Popular
Highest Rated
Latest Comments
Code Samples
Newest Code
Most Popular
Highest Rated
Latest Comments
Blogs
Admins Blog
Newest Blogs
Most Popular
Highest Rated
Latest Comments
Forums
Latest Posts
Latest Topics
Memberlist
[login]
|
[Register]
Instead of Using End
by: starkweatherr
Description:
Six lines of code that will, under most circumstances, release all of the memory used by all of the forms included in your application. Remember that Forms is the name of a Collection but a Form is an Object. This will not necessarily release memory dynamically allocated for variables. Remember that the Form_Unload Event of the a form is a good place to do any cleanup needed at the end of a program. CleanExit() will trigger the Form_Unload event of each form.
Code:
Public Sub CleanExit() Dim frmForm As Form For Each frmForm In Forms Unload frmForm Set frmForm = Nothing Next ' frmForm End Sub
No Comments for this page.
You Must be
signed in
or a
member
to comment.
Code Stats
11,360
Views
0
Total Comments
0
Rating of 5 (
Votes)
Code Options
·
Login to Rate This Code
·
Login to Post a Comment
·
Read more by this author
Related
·
RGB Color Fader
·
Adder
·
Math Problems
·
Cut and Paste
·
Combo Box Colors
·
Flag Viewer
"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy
|
Internet Rank