Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MS4
#65
I'm alive!

This is why I do the set = new.
Quote:Don't Dim .. As New

Dim obj As MyClass
Set obj = New MyClass
Why write 2 lines when you can just say Dim obj As New MyClass?

Never Dim anything As New if you're concerned about speed. VB6 will treat such a variable as an auto-instantiated variable. Every time you use it, VB will check if it should be instantiated. This will cost you some extra CPU cycles.
http://www.aivosto.com/vbtips/not-optimize.html

One of these days, I'm going to rewrite it all so there's a 'global' outgoing buffer to make sending packets even faster.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)