|
-
Sep 15th, 2000, 09:16 AM
#1
Thread Starter
Member
My documentation for VB says this about GlobalSingleUse Objects:
"For out of process components only, you can set the instancing property of a class module to GlobalSingleUse. If you do this, a separate instance of your component will be loaded into memory for each client. This requires a lot more memory than providing GlobalMultiUse objects"
Then earlier for GlobalMultiUse it says:
"Each client that uses the properties and methods of a GlobalMultiUse class gets its own instance of the class. In other words, the "Global" in GlobalMultiUse does not mean "one global instance that all clients share".
I know that the "global" means. IT is a reference to scope so that the classes who objects you use don't have to be explicitely created to use the objects contained therein.
However, I don't see a difference between MultiUse and SingleUse. (Is it a threading thingy?).
Thanks.
-
Sep 15th, 2000, 09:35 AM
#2
here is the answer
the difference between GlobalMultiUser and GlobalSingleUser is:
by GlobalSingleUser get every Client his own Instance
by GlobalMultiUser the first client create an Instance of the Object, all other clients get only a new thread of the object.
difference between GlobalMultiUser and MultiUser
if you have a class with GlobalMultiUser you don't need to declare the class. Example
Private Sub cmdCalculateResult_Click()
txtResult.Text = LeastReasonableReturn(CCur(txtBeginningBalance.Text))
End Sub
By MultiUser:
Private Sub cmdCalculateResult_Click()
Dim gfins as New Financials
txtResult.Text = gfins.LeastReasonableReturn(CCur(txtBeginningBalance.Text))
set gfins=nothing
End Sub
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
|