how many instance will a shared variable be created? just 1 correct?
Hi :
How many instances of a shared variable will be created in a class? just one? correct
Code:
Public Class DocumentDelivery
Implements IDisposable
'A rendered list that contains the rendered documents
Public Shared RenderList As List(Of Byte()())
End Class
So, in other words, the DocumentDelivery class will only have one instance of RenderList, correct? can somebody confirm?
Re: how many instance will a shared variable be created? just 1 correct?
correct. And all instances of DocumentDelivery (if any) would share it, as any piece of code that can access it through DocumentDelivery (class itself).
Beware of multithreading on a multiprocessor machine, though: it might ruin your day...
Re: how many instance will a shared variable be created? just 1 correct?
why? if I never intend for this to run in a multi threaded environment...
Re: how many instance will a shared variable be created? just 1 correct?
then you should have no matters.