sskodje / wpfchrometabs-mvvm

A tab control based on WPF chrome tabs, modified to work with the MVVM pattern
MIT License
256 stars 60 forks source link

Tab don't dispose when close #24

Closed tvc12 closed 5 years ago

tvc12 commented 5 years ago

Hey you, i'm very interested your project, so i tried running your demo. Then i find out some problems. Tabs don't dispose when i close, so RAM increase.

Arsync commented 5 years ago

Tabs don't dispose when i close, so RAM increase.

I have the fork of this control (VS 2017 and .NET 4.6.1) to work with Prism in splitted containers (DryIoc) per each tab with no memory leaks. Try this 'cut' of enterprise solution as possible workaround: https://github.com/Arsync/wpfchrometabs-mvvm

There is cross-window tab movement (ChromeTabControl in each window) and several fixes. TabPersistMode.None cause some problems when templating instances of a same TabViewModel class, so there is better to use TabPersistMode.All

sskodje commented 5 years ago

Hello!

The demo project by default caches the tab content for a short period, but it should dispose after a while. If you want to test it, you can just create some large object to visibly increase ram, close the tabs, then call GC.Collect();

Setting TabPersist to None will destroy and recreate the tabs every time.

tvc12 commented 5 years ago

Thank you every body, ^^ meow