Commit 225b990
Second half of fix to dotnet/fsharp#106
FSharp.Compiler.Service contained a more complete fix for
dotnet/fsharp#106, which relates to the
memory leaks that can arise if type provider instance objects are kept live.
Historically the memory leaks have happened if a type provider registers
itself to listen to file system events (or other notifications), but for some
reason doesn't disconnect those listeners when the type provider is disposed.
This keeps the type provider instance alive - which is a bug in the type
provider - but even worse it can keep '00s MB of data associated with the
compiler state alive as well.
The missing part of the fix is to disconnect the "TypeProviderConfig" callback
when the type providers are disposed, so that even if a type provider instance
hangs on to a reference to the TypeProviderConfig, that doesn't cause the entire
object graph for the compilation session to be retained in memory.
After type provider disposal, any TypeProviderConfig objects provided to the
type provider will now raise ObjectDisposedException when the
SystemRuntimeContainsType method is called.
closes dotnet/fsharp#591
fixes dotnet/fsharp#106
commit d3b2f0e1b7f117de84feadcddc085a3cba307c09
Author: Don Syme <donsyme@fastmail.fm>
Date: Fri Aug 14 14:35:53 2015 +0100
testing for 2nd half of 106
commit adebe18e0291935d1b7eebd362abfef4b2dacc49
Author: Don Syme <donsyme@fastmail.fm>
Date: Fri Aug 14 14:09:51 2015 +0100
Second half of fix to dotnet/fsharp#1061 parent 9157d60 commit 225b990
File tree
3 files changed
+25
-2
lines changed- src/fsharp
- vsintegration/src/unittests
- Resources.MockTypeProviders/DummyProviderForLanguageServiceTesting
3 files changed
+25
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3837 | 3837 | | |
3838 | 3838 | | |
3839 | 3839 | | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + | |
| 3847 | + | |
| 3848 | + | |
3840 | 3849 | | |
3841 | 3850 | | |
3842 | 3851 | | |
3843 | | - | |
| 3852 | + | |
3844 | 3853 | | |
3845 | 3854 | | |
3846 | 3855 | | |
| |||
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
120 | 129 | | |
121 | 130 | | |
122 | 131 | | |
123 | | - | |
| 132 | + | |
124 | 133 | | |
125 | 134 | | |
126 | 135 | | |
| 136 | + | |
127 | 137 | | |
128 | 138 | | |
129 | 139 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1628 | 1628 | | |
1629 | 1629 | | |
1630 | 1630 | | |
| 1631 | + | |
| 1632 | + | |
1631 | 1633 | | |
1632 | 1634 | | |
1633 | 1635 | | |
| |||
1638 | 1640 | | |
1639 | 1641 | | |
1640 | 1642 | | |
| 1643 | + | |
1641 | 1644 | | |
1642 | 1645 | | |
1643 | 1646 | | |
| |||
1693 | 1696 | | |
1694 | 1697 | | |
1695 | 1698 | | |
| 1699 | + | |
1696 | 1700 | | |
1697 | 1701 | | |
1698 | 1702 | | |
| |||
0 commit comments