GC.SuppressFinalize doesn't keep an object from being garbage collected.

The only way to prevent an object from being collected is to insure
there is always a live reference to the object.


-- Brent Rector, .NET Wise Owl
Demeanor for .NET - an obfuscation utility
http://www.wiseowl.com/Products/Products.aspx



-----Original Message-----
From: franklin gray [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 29, 2002 1:30 PM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] singleton server problem


so the object will stay in memory after all references have been
disposed.  That was when you come back to it later, it is still there
with the same data.

-----Original Message-----
From: Bill Conroy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 3:21 PM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] singleton server problem


>> GC.SuppressFinalize(mCurrentUser)

Why this call?

-bc

-----Original Message-----
From: franklin gray [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 29, 2002 4:01 PM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] singleton server problem


exactly how do you have you singleton object coded?  

This is how I do mine.  If you do it this way, then there isn't any way
to register it as a singleton object that I know of.  The system will
treat it just like any other object, except it will not garbage collect
it.


    Private Shared mCurrentUser As CurrentUser

    Public Shared Function Instance() As CurrentUser
        If mCurrentUser Is Nothing Then
            mCurrentUser = New CurrentUser()
            GC.SuppressFinalize(mCurrentUser)
        End If
        Instance = mCurrentUser
    End Function

-----Original Message-----
From: Manuel Costa [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 11:37 AM
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET] singleton server problem


Hi,

Is there a limit for the number of simultaneous calls to a remote object
registered as singleton? I have an application with several servers and
several clients per server. After some amount of simultaneous calls to
the servers they stop responding, blocking any client call. When a
client invokes a method it will stay blocked and if i try to debug at
the server side by putting a breakpoint in the called method, nothing
will happen. Is there any reasonable explanation for this?

Manuel

You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or subscribe to other DevelopMentor lists at
http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or subscribe to other DevelopMentor lists at
http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or subscribe to other DevelopMentor lists at
http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or subscribe to other DevelopMentor lists at
http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to