what is the Difference between Declaration and
Instantiation an object?
Answer Posted / guest
Dim obj as OBJ.CLASS with either
Set obj = New OBJ.CLASS or
Set obj = CreateObject(?OBJ.CLASS?) or
Set obj = GetObject( ,? OBJ.CLASS?)
or
Dim obj as New OBJ.CLASS
Set object = Nothing
ensure the object is release from the memory.
If this object is a form, you can add set myform = nothing
and Form_Unload() event.Maintain a habit of remove the
object by using set object = nothing which will benefit at
last. Visual Basic is supposed to automatically release
objects when they go out of scope. To free up some memory
usage, you can set the object to nothing.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
what are the Differences between ActiveX Control and Standard Control?
Types of Resultsets.
What is form in visual basic?
How do you make a TEXTBOX read only? Or, how do I prevent the user from changing the text in a TEXTBOX?
DHTML Is used for what?
What are the rules which should be followed while naming a variable in VB?
How would you create your application in DHTML?
How many File System Controls are there ? Explain.
How do I play MID, WAV or other multimedia files?
How can you check whether a record is valid record or Invalid record using ADO control or Object?
What do you know about chaining views.
What is vbs file?
Is a foo VBX/DLL available as shareware/freeware?
What is the use of property page Wizard in ActiveX Control?
How do I create a new form in visual basic?