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 do I make my applications screen-resolution independent?

1016


How can you Add API functions to your Application?

1350


What is dao in vb?

504


Parts of ODBC?

1454


How many ways we can access file using VB?

1684






Which method is preferred to save datas like database?

1478


What is the default workspace?

1494


How would you add elements and pictures to listitems in listview control?

1525


Why can't I use an index with my VB accessed database?

984


___,__,___ are the type of combo box?

1148


I have several megabytes of memory. Why do I get an "out of memory" error?

1097


What is DBSqlPassThrough?

2641


How do I implement Undo?

964


advantage and disadvantage in visual-basic and ms-access please tell me or send my mail-id

2657


How can you determine performance standards?

624