Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class MyClass{
  2.    static Create(){
  3.       let instance = new MyClass();
  4.       let oldDispose = instance.Dispose.bind(instance);
  5.       instance.Dispose = () => {
  6.          oldDispose();
  7.          instance = null;
  8.       }
  9.       return instance;
  10.       Dispose(){
  11.      
  12.       }
  13.      
  14.    }
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement