what is the Difference between Declaration and
Instantiation an object?



what is the Difference between Declaration and Instantiation an object?..

Answer / 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

More Visual Basic Interview Questions

what are the Types of LockEdits in RDO?

0 Answers  


What is the difference between Exec and ExecSQL? (wouldnt this be dependent on data access? Ie ADO use different method than DAO)

1 Answers  


Whats the advantages/disadvantages of using datacontrol vs DAO/ADO/RDO?

1 Answers   L&T, MAHINDRA, Teledata,


What is "Reserved Error -1209"?

0 Answers  


What are the Internet tools available in VB6.0?

0 Answers   ABC,






What are the different compatibility types when we create a COM component?

2 Answers  


How would you access objects created in ActiveX Exe and ActiveX Dll

0 Answers  


What is the difference between queryunload and unload in form?

2 Answers  


How to find size of the file. Which method or function is used to occomplish this?

0 Answers  


What about DLL calls that require callbacks?

0 Answers  


What are the tools available for Debuggiu in VB?

0 Answers  


How would you add column headers in listview control?

1 Answers   Infosys,


Categories