Fix memory leaks

This commit is contained in:
Thomas Nordquist
2019-04-24 23:40:28 +02:00
parent 4c4e1543ec
commit 749df70d5c
11 changed files with 58 additions and 33 deletions

View File

@@ -78,6 +78,8 @@ export const disconnect = () => (dispatch: Dispatch<any>, getState: () => AppSta
}
tree && tree.stopUpdating()
tree && tree.destroy()
// Clear topic filter
dispatch({
topicFilter: '',
@@ -88,4 +90,5 @@ export const disconnect = () => (dispatch: Dispatch<any>, getState: () => AppSta
dispatch({
type: ActionTypes.CONNECTION_SET_DISCONNECTED,
})
dispatch(showTree(undefined))
}