Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Toilet : IDisposable
- {
- object mutex = new object();
- byte[] waste = new byte[10000000];
- ~Toilet()
- {
- Dispose();
- }
- public void Dispose()
- {
- lock(mutex){
- Console.WriteLine("Flushing");
- waste = null;
- GC.SuppressFinalize(this);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement