Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 28-02-2009
Member
 
Join Date: Jan 2009
Posts: 36
What is the difference between Declaration and Instantiation an object?

Hello,

What is the difference between Declaration and Instantiation an object?

Regards,
Reply With Quote
  #2  
Old 28-02-2009
Member
 
Join Date: May 2008
Posts: 35
Re: What is the difference between Declaration and Instantiation an object?

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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "What is the difference between Declaration and Instantiation an object?"
Thread Thread Starter Forum Replies Last Post
Why Doctype declaration is there in HTML? T0tal L0$$ Software Development 3 22-09-2009 12:46 PM
Explicit template instantiation Wyvern Software Development 4 02-05-2009 07:15 PM
What is the difference between an object and an instance in java? Lalit5 Software Development 5 02-03-2009 09:00 PM
What is the Difference between Class and Object? RupaliP Software Development 5 28-02-2009 07:03 PM
Difference between Implicit and Explicit Declaration vinodpathak_214 Software Development 3 16-01-2009 10:00 AM


All times are GMT +5.5. The time now is 06:03 AM.