Why is window set to null when closed?


#1

In docs, what is the purpose of the following snippet:

win.on('closed', () => {
  win = null
});

Why are we setting win to null?


#2

To free win variable not respond to any attached event anymore…