You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// disposing deliberately only closes this tcImports, not the ones up the chain
3771
+
isDisposed <-true
3772
+
if verbose then
3773
+
dprintf "disposing of TcImports, %d binaries\n" disposeActions.Count
3774
+
#if!NO_EXTENSIONTYPING
3775
+
letactions= disposeTypeProviderActions
3776
+
if actions.Count >0then
3777
+
compilationThread.EnqueueWork (fun _ ->for action in actions do action())
3778
+
#endif
3779
+
for action in disposeActions do action()
3780
+
3781
+
override_.Finalize()=
3782
+
dispose ()
3783
+
3784
+
interface IDisposable with
3785
+
3786
+
memberthis.Dispose()=
3787
+
ifnot isDisposed then
3788
+
GC.SuppressFinalize this
3789
+
dispose ()
3790
+
3759
3791
#if!NO_EXTENSIONTYPING
3760
3792
// These are hacks in order to allow TcImports to be held as a weak reference inside a type provider.
3761
3793
// The reason is due to older type providers compiled using an older TypeProviderSDK, that SDK used reflection on fields and properties to determine the contract.
@@ -3800,34 +3832,24 @@ and [<Sealed>] TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAsse
3800
3832
let mutabledllTable:NameMap<ImportedBinary>= NameMap.empty
3801
3833
let mutableccuInfos:ImportedAssembly list =[]
3802
3834
let mutableccuTable:NameMap<ImportedAssembly>= NameMap.empty
3803
-
let mutabledisposeActions=[]
3835
+
letdisposeActions=ResizeArray()
3804
3836
let mutabledisposed=false
3805
3837
let mutableilGlobalsOpt= ilGlobalsOpt
3806
3838
let mutabletcGlobals= None
3807
3839
#if!NO_EXTENSIONTYPING
3808
-
let mutabledisposeTypeProviderActions=[]
3840
+
letdisposeTypeProviderActions=ResizeArray()
3809
3841
let mutablegeneratedTypeRoots=new System.Collections.Generic.Dictionary<ILTypeRef, int * ProviderGeneratedType>()
3810
3842
let mutabletcImportsWeak= TcImportsWeakHack (WeakReference<_> this)
0 commit comments