|
-
Jan 12th, 2000, 01:06 AM
#1
Thread Starter
Junior Member
Is there a difference between defining a variable as Global or defining it as Public?
Ex.
Global giEmpNbr as integer
Public giEmpNbr as integer
I think Public has replaced Global but are there any differences when concerned with memory?
Should I be concerned with deallocating memory in VB? Or does it just happen automatically?
-
Jan 12th, 2000, 01:10 AM
#2
New Member
Best using classes and storing variables as a property of that class and creating an instance of that class to reference the property. Object Orientated programming is the way. If you need any help just say
-
Jan 12th, 2000, 02:41 AM
#3
You are correct about Public replacing Global, but both are supported. I don't think there is any memory differences but I could be wrong. Yes, you should be concerned about deallocating memory in VB. While most of it is done automatically, you should set any objects (recordsets, forms, etc) that you create at run time = Nothing.
------------------
Marty
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|