G
Guest
1.The follow two ways to declare one object: any difference? especially its
performance.
a.Private m_objMyObject As MyObject=New MyObject()
b.Private m_objMyObject As MyObject
m_objMyObject=New MyObject
2.Any difference between a and b?
a.
For Each childItem In SomeItems
Dim objData As DataObject=m_objOneSource.GetData(childItem.ID)
Next
b.
Dim objData As DataObject
For Each childItem In SomeItems
objData=m_objOneSource.GetData(childItem.ID)
Next
3.Explicitly destroy an object will hurt the system performance rather than
improve it?
Dim o_objSomething As SomeObject
'do something
o_objSomething=Nothing
4.Any difference in performance/system resources usage between
public/private declaration of objects/functions?
For example:
a.public objOne as TheObject
b.private objOne as TheObject
performance.
a.Private m_objMyObject As MyObject=New MyObject()
b.Private m_objMyObject As MyObject
m_objMyObject=New MyObject
2.Any difference between a and b?
a.
For Each childItem In SomeItems
Dim objData As DataObject=m_objOneSource.GetData(childItem.ID)
Next
b.
Dim objData As DataObject
For Each childItem In SomeItems
objData=m_objOneSource.GetData(childItem.ID)
Next
3.Explicitly destroy an object will hurt the system performance rather than
improve it?
Dim o_objSomething As SomeObject
'do something
o_objSomething=Nothing
4.Any difference in performance/system resources usage between
public/private declaration of objects/functions?
For example:
a.public objOne as TheObject
b.private objOne as TheObject