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


Please Help Members By Posting Answers For Below Questions

how to use telugu language in vb6? any unicode data is available for telugu or not?yes means how to use? my desired output is telugu only? i am doing project like(telugu calendar),my output should be print in telugu only? pls send me the solution with code?

3261


What are the Internet tools available in VB 6.0?

2604


Can a VB application be an OLE server?

1192


How can you save and Get data from Clipboard/ Recordset object consists what?

783


How would you convert a form into document?

1574


What is data binding in vb net?

715


Difference between Class Module and Standard Module?

2186


What is ODBC Direct and Microsoft Jet Database Engine ?

2123


What is OLEDB?

2111


Is there any Edit method in ADO Data Access method?

1800


What is the difference between adodc and adodb in vb?

781


How do I get my application on top?

1157


How would you run your ActiveX Document Dll?

1821


How would you use ActiveX Dll and ActiveX Exe in your application?

1816


Difference between Linked Object and Embedded Object?

2030