Created
February 25, 2015 01:30
-
-
Save plioi/c2b624dc864720fd1fc0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NoSeriouslyDudeMarshalByRefObject : MarshalByRefObject, IDisposable | |
{ | |
public override sealed object InitializeLifetimeService() | |
{ | |
return null; //Prevent the object from being ruined after 6 or so minutes. | |
} | |
public void Dispose() | |
{ | |
RemotingServices.Disconnect(this); //Avoid the memory leak otherwise introduced above. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment