Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyClass{
- static Create(){
- let instance = new MyClass();
- let oldDispose = instance.Dispose.bind(instance);
- instance.Dispose = () => {
- oldDispose();
- instance = null;
- }
- return instance;
- Dispose(){
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement