t9md / atom-cursor-history

Cursor position history manager
https://atom.io/packages/cursor-history
MIT License
59 stars 7 forks source link

Destroyed TextEditor is not released immediately #5

Closed aki77 closed 9 years ago

aki77 commented 9 years ago

In this snapshot, I have only a single tab open.

Gyazo

Of the other plugin object is not released until it exceeds the max setting.

https://github.com/atom/bracket-matcher/pull/147

t9md commented 9 years ago

@aki77 Thanks for catching this. I've modified your PR a little. Could you verify editor is released with same operation?

aki77 commented 9 years ago

Thanks! Only one small thing which needs to be fixed.

https://github.com/t9md/atom-cursor-history/commit/4aa323b077af96bc017fd52db97ab7c10f28014d#commitcomment-12097377

t9md commented 9 years ago

Before this fix, destroyed editor wasn't released immediately since these code keep reference to destroyed editor. By this fix, properly release reference to editor onDidDestroy and won't keep reference if its already destroyed at initialization.

Thanks @aki77 !!