tatic constructors are
thread-safe.
Regards,
Frank Hileman
Prodige Software Corporation
- Original Message -
From: "Peter Lillevold" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 5:56 AM
Subject: Re: [ADVANCED-DOTNET] Singleton pattern
> Actually,
On Behalf Of Stefan
> Avramtchev
> Sent: 18 June 2002 13:47
> To: [EMAIL PROTECTED]
> Subject: Re: [ADVANCED-DOTNET] Singleton pattern
>
>
> I think the type contructors is thread safe.
>
> How otherwise is the framework guarding this rule if not by locking some
> internal obj
. juni 2002 14:47
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Singleton pattern
I think the type contructors is thread safe.
How otherwise is the framework guarding this rule if not by locking some
internal object (not the being-initialised class ofcourse) in order to
guarantee that only
Static methods provide no more encapsulation than instance methods. Static
methods are less flexible because they cannot be virtual. I don't see any
advantage.
The property which retrieves the Singleton instance must be static.
If the Singleton has no data at all, then it makes sense to just use
http://www.aspalliance.com/aldotnet/examples/translate.aspx
-Original Message-
From: Shawn Wildermuth [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 12:30 PM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Singleton pattern
What tool did you use to go from C# to VB
-
From: Frank Hileman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 8:20 AM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Singleton pattern
Hello Brad Adams,
Why do you have all this locking code? A static constructor is already
thread-safe. From C# spec:
"The static constr
: [EMAIL PROTECTED]
> Subject: Re: [ADVANCED-DOTNET] Singleton pattern
>
>
> Brian:
>
> I ran this through the C# to Vb web tool and below is what I
> got (After I took out the comments).
>
> Questions:
> 1) What is _value?
> 2) How is it different from the bottom cl
Hello Brad Adams,
Why do you have all this locking code? A static constructor is already
thread-safe. From C# spec:
"The static constructor for a class executes at most one time during a
single program instantiation"
You can read messages from the Advanced DOTNET archive, unsubscribe from Advan
that
the assignment to _value and any writes inside the Singleton constructor
complete before the instance can be accessed
..brad
-Original Message-
From: Ian Griffiths [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 5:57 AM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET
e variable).
-Mike
http://staff.develop.com/woodring
http://www.develop.com/devresources
- Original Message -
From: "Greg Reinacker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 03, 2002 5:09 PM
Subject: Re: [ADVANCED-DOTNET] Singleton pattern
> &g
riable).
-Mike
http://staff.develop.com/woodring
http://www.develop.com/devresources
- Original Message -
From: "Greg Reinacker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 03, 2002 5:09 PM
Subject: Re: [ADVANCED-DOTNET] Singleton pattern
Hi,
Given an exe that contains multiple services, with LoaderOptimization of
SingleDomain, I would presume that each service would be created in
separate AppDomain, and they would access to separate Singletons.
But this is not the case!
Below is code that shows that they access the *same* Singlet
> -Original Message-
> From: Moderated discussion of advanced .NET topics.
> [mailto:[EMAIL PROTECTED]] On Behalf Of Noam Arbel
> Sent: Saturday, June 01, 2002 12:39 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [ADVANCED-DOTNET] Singleton pattern
>
>
> I think it is usefull to
I think it is usefull to understand when SuppressFinalize() should be used.
If you look at code like this:
public class UseResource
{
public void OpenResource()
{
// open a resource for use
}
public void UseResource()
{
// Do some stuff with the resource
}
public void Clos
/default.asp?url=/library/en-us/dnbda/html/
singletondespatt.asp
--
Lars
> -Original Message-
> From: Moderated discussion of advanced .NET topics.
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jonni Faiga
> Sent: 31 May 2002 10:38
> To: [EMAIL PROTECTED]
> Subject: [ADVANCED-DOTNET]
Conroy [mailto:[EMAIL PROTECTED]]
>Sent: Friday, May 31, 2002 8:02 AM
>To: [EMAIL PROTECTED]
>Subject: Re: [ADVANCED-DOTNET] Singleton pattern
>
>
>This is Bill, and I'm quite sure I'm right. Actually, I'm positive. And
>Bajaj is correct also. It's all about the sta
Wise Owl
Demeanor for .NET - an obfuscation utility
http://www.wiseowl.com/Products/Products.aspx
-Original Message-
From: franklin gray [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 8:04 AM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Singleton pattern
The rema
if this is the problem (I don't think it is though).
-Original Message-
From: Bill Conroy [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 8:02 AM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Singleton pattern
This is Bill, and I'm quite sure I'm right. Actual
18 matches
Mail list logo