Click here to Skip to main content
15,902,114 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalcapturing and handling keyboard input Pin
oakleaf17-Aug-05 2:17
oakleaf17-Aug-05 2:17 
GeneralRe: capturing and handling keyboard input Pin
oakleaf17-Aug-05 2:36
oakleaf17-Aug-05 2:36 
GeneralRe: capturing and handling keyboard input Pin
Dave Kreskowiak17-Aug-05 4:07
mveDave Kreskowiak17-Aug-05 4:07 
GeneralRe: capturing and handling keyboard input Pin
oakleaf17-Aug-05 5:08
oakleaf17-Aug-05 5:08 
GeneralRe: capturing and handling keyboard input Pin
Dave Kreskowiak17-Aug-05 5:21
mveDave Kreskowiak17-Aug-05 5:21 
GeneralRe: capturing and handling keyboard input Pin
oakleaf17-Aug-05 5:25
oakleaf17-Aug-05 5:25 
GeneralReleaseComObject() and Dispose pattern association Pin
DeepakSharma17-Aug-05 2:12
DeepakSharma17-Aug-05 2:12 
GeneralRe: ReleaseComObject() and Dispose pattern association Pin
Dave Kreskowiak17-Aug-05 3:54
mveDave Kreskowiak17-Aug-05 3:54 
Dispose gives a MANAGED object (any class you write) the opportunity to clean up and free any resources that it needs to before the object is detroyed. For some classes, this isn't necessary. For others, this is a necessity. For instance, creating a FileStream object opens an unmanaged file handle allocated by the system. If you didn't call the Dispose, or Close, method on the FileStream object, the object would eventually be destroyed, when it falls out of scope, and the underlying file handle orphaned, causing a resource leak. Eventually, you could consume thousands upon thousands of file handles, never releasing them back to the system (Windows) and eventually crashing it.

The very same thing can happen with COM object that you wrap with .NET classes. If your .NET class creates an instance of a COM object, it also has to release that instance, using ReleaseComObject, when it's done. Usually, this is done inside the Dispose method of your class.


DeepakSharma wrote:
Are they substitute of each
other?


Not just no, but HELL NO. Dispose and ReleaseComObject deal with entirely different objects and situations. They are by no means interchangable.


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: ReleaseComObject() and Dispose pattern association Pin
DeepakSharma17-Aug-05 17:40
DeepakSharma17-Aug-05 17:40 
QuestionHow to create dbf file in vb.net Pin
TooLeeDiN17-Aug-05 0:58
TooLeeDiN17-Aug-05 0:58 
AnswerRe: How to create dbf file in vb.net Pin
toxcct17-Aug-05 1:24
toxcct17-Aug-05 1:24 
AnswerRe: How to create dbf file in vb.net Pin
Dave Kreskowiak17-Aug-05 3:45
mveDave Kreskowiak17-Aug-05 3:45 
AnswerRe: How to create dbf file in vb.net Pin
TooLeeDiN17-Aug-05 16:46
TooLeeDiN17-Aug-05 16:46 
Generalsound card libary Pin
meiyueh16-Aug-05 22:23
meiyueh16-Aug-05 22:23 
GeneralRe: sound card libary Pin
Dave Kreskowiak17-Aug-05 3:43
mveDave Kreskowiak17-Aug-05 3:43 
GeneralUsing ActiveX as pop-up menu Pin
Spaz8016-Aug-05 22:01
Spaz8016-Aug-05 22:01 
GeneralRe: Using ActiveX as pop-up menu Pin
Dave Kreskowiak17-Aug-05 3:36
mveDave Kreskowiak17-Aug-05 3:36 
GeneralUsing SMTP with VB.net Pin
RaDiKaLz16-Aug-05 19:43
RaDiKaLz16-Aug-05 19:43 
GeneralRe: Using SMTP with VB.net Pin
Anonymous16-Aug-05 21:46
Anonymous16-Aug-05 21:46 
GeneralRe: Using SMTP with VB.net Pin
RaDiKaLz16-Aug-05 22:27
RaDiKaLz16-Aug-05 22:27 
GeneralURGENT PLZZ VB.NET Pin
Bellinda16-Aug-05 19:43
Bellinda16-Aug-05 19:43 
GeneralRe: URGENT PLZZ VB.NET Pin
Anonymous16-Aug-05 21:48
Anonymous16-Aug-05 21:48 
Question:confused:Time Out Error?? Pin
BORN...again!16-Aug-05 19:13
BORN...again!16-Aug-05 19:13 
AnswerRe: :confused:Time Out Error?? Pin
Dave Kreskowiak17-Aug-05 3:33
mveDave Kreskowiak17-Aug-05 3:33 
GeneralRe: :confused:Time Out Error?? Pin
BORN...again!17-Aug-05 14:34
BORN...again!17-Aug-05 14:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.