We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff3f32f commit 54789d0Copy full SHA for 54789d0
src/Ubiquity.NET.Llvm/BitcodeModule.cs
@@ -293,6 +293,12 @@ public void Dispose( )
293
// finalizer, which would cause an access violation in the native LLVM layer.
294
if( !IsDisposed )
295
{
296
+ // DI builder is owned by this module, so when it is destroyed so is the builder
297
+ if(LazyDiBuilder.IsValueCreated)
298
+ {
299
+ LazyDiBuilder.Value.BuilderHandle.SetHandleAsInvalid();
300
+ }
301
+
302
// remove the module handle from the module cache.
303
ModuleHandle!.Dispose( );
304
ModuleHandle = default;
0 commit comments