OpherV / gitflow4idea

Git Flow Integration plugin for IntelliJ
Apache License 2.0
504 stars 138 forks source link

don't cache status bar widget in factory #304

Closed tumb1er closed 4 years ago

tumb1er commented 4 years ago

closes #301 cached widget could not be added to second project window, ide crashed

OpherV commented 4 years ago

@tumb1er I feel like this would lead to a memory leak. The proper way to go about it is do caching per project - create a map object with projects as keys and widgets as values. Want to try and give it a go?

tumb1er commented 4 years ago

I'll try it.

tumb1er commented 4 years ago

@OpherV I looked through internal Idea factories and didn't find any factory that uses widget caching. Every factory calls Disposer.dispose(widget) like this ont, so memory leak is unlikely.

tumb1er commented 4 years ago

The only factory with caching is StatusBarWidgetProviderToFactoryAdapter, but 1) it is marked internal 2) it is obviously compatibility support code

OpherV commented 4 years ago

Ok, fair enough. Merged